File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -210,17 +210,17 @@ const DropdownLight = ({
210
210
const downPress = useKeyPress ( 'ArrowDown' ) ;
211
211
const upPress = useKeyPress ( 'ArrowUp' ) ;
212
212
const enterPress = useKeyPress ( 'Enter' ) ;
213
- const filteredItemIndex = useKeyboardSearchItems ( items , cursor , isOpen ) ;
213
+ const focusedItemIndex = useKeyboardSearchItems ( items , cursor , isOpen ) ;
214
214
const EscapeKeyPressValue = 'Escape' ;
215
215
216
216
const handleToggleDropdown = ( ) => {
217
217
setIsOpen ( ! isOpen ) ;
218
218
} ;
219
219
220
220
useEffect ( ( ) => {
221
- const hasItemSelected = typeof filteredItemIndex === 'number' ;
222
- setCursor ( hasItemSelected ? filteredItemIndex : - 1 ) ;
223
- } , [ filteredItemIndex ] ) ;
221
+ const hasItemSelected = typeof focusedItemIndex === 'number' ;
222
+ setCursor ( hasItemSelected ? focusedItemIndex : - 1 ) ;
223
+ } , [ focusedItemIndex ] ) ;
224
224
225
225
useEffect ( ( ) => {
226
226
if ( isOpen && cursor >= 0 ) {
You can’t perform that action at this time.
0 commit comments