Skip to content

Commit 314022d

Browse files
chore: replace deprecated useKeyOnly with getKeyOnly in modules/Search
1 parent 2d06a91 commit 314022d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/modules/Search/Search.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {
1717
objectDiff,
1818
partitionHTMLProps,
1919
SUI,
20-
useKeyOnly,
21-
useValueAndKey,
20+
getKeyOnly,
21+
getValueAndKey,
2222
} from '../../lib'
2323
import Input from '../../elements/Input'
2424
import SearchCategory from './SearchCategory'
@@ -509,11 +509,11 @@ class SearchInner extends Component {
509509
open && 'active visible',
510510
size,
511511
searchClasses,
512-
useKeyOnly(category, 'category'),
513-
useKeyOnly(focus, 'focus'),
514-
useKeyOnly(fluid, 'fluid'),
515-
useKeyOnly(loading, 'loading'),
516-
useValueAndKey(aligned, 'aligned'),
512+
getKeyOnly(category, 'category'),
513+
getKeyOnly(focus, 'focus'),
514+
getKeyOnly(fluid, 'fluid'),
515+
getKeyOnly(loading, 'loading'),
516+
getValueAndKey(aligned, 'aligned'),
517517
'search',
518518
className,
519519
)

src/modules/Search/SearchCategory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
customPropTypes,
88
getComponentType,
99
getUnhandledProps,
10-
useKeyOnly,
10+
getKeyOnly,
1111
} from '../../lib'
1212
import SearchCategoryLayout from './SearchCategoryLayout'
1313

@@ -21,7 +21,7 @@ const SearchCategory = React.forwardRef(function (props, ref) {
2121
renderer = ({ name }) => name,
2222
} = props
2323

24-
const classes = cx(useKeyOnly(active, 'active'), 'category', className)
24+
const classes = cx(getKeyOnly(active, 'active'), 'category', className)
2525
const rest = getUnhandledProps(SearchCategory, props)
2626
const ElementType = getComponentType(props)
2727

src/modules/Search/SearchResult.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
customPropTypes,
99
getComponentType,
1010
getUnhandledProps,
11-
useKeyOnly,
11+
getKeyOnly,
1212
} from '../../lib'
1313

1414
// Note: You technically only need the 'content' wrapper when there's an
@@ -38,7 +38,7 @@ const SearchResult = React.forwardRef(function (props, ref) {
3838
_.invoke(props, 'onClick', e, props)
3939
}
4040

41-
const classes = cx(useKeyOnly(active, 'active'), 'result', className)
41+
const classes = cx(getKeyOnly(active, 'active'), 'result', className)
4242
const rest = getUnhandledProps(SearchResult, props)
4343
const ElementType = getComponentType(props)
4444

0 commit comments

Comments
 (0)