Skip to content

Commit

Permalink
minor edit
Browse files Browse the repository at this point in the history
Co-authored-by: Monil Bhavsar <[email protected]>
  • Loading branch information
abzokhattab and MonilBhavsar authored Feb 14, 2024
1 parent 3dab35f commit f4393b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function BaseSelectionList<TItem extends User | RadioItem>(
return;
}
// Remove the focus if the search input is empty else focus on the first non disabled item
const newSelectedIndex = textInputValue !== '' ? 0 : -1;
const newSelectedIndex = textInputValue === '' ? -1 : 0;

updateAndScrollToFocusedIndex(newSelectedIndex);
}, [canSelectMultiple, flattenedSections.allOptions.length, prevTextInputValue, textInputValue, updateAndScrollToFocusedIndex]);
Expand Down

0 comments on commit f4393b1

Please sign in to comment.