Skip to content

Commit 885a7b3

Browse files
committed
extend comment
1 parent 78282c3 commit 885a7b3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/SelectionList/BaseSelectionList.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,8 @@ function BaseSelectionList<TItem extends ListItem>(
645645
) {
646646
return;
647647
}
648-
// Remove the focus if the search input is empty or selected options length is changed (and allOptions length remains the same)
648+
// Remove the focus if the search input is empty and prev search input not empty or selected options length is changed (and allOptions length remains the same)
649649
// else focus on the first non disabled item
650-
651650
const newSelectedIndex =
652651
(isEmpty(prevTextInputValue) && textInputValue === '') ||
653652
(flattenedSections.selectedOptions.length !== prevSelectedOptionsLength && prevAllOptionsLength === flattenedSections.allOptions.length)

0 commit comments

Comments
 (0)