We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a8574f commit da88626Copy full SHA for da88626
src/components/SelectionList/BaseSelectionList.tsx
@@ -652,8 +652,9 @@ function BaseSelectionList<TItem extends ListItem>(
652
useEffect(() => {
653
// Avoid changing focus if the textInputValue remains unchanged.
654
if (
655
- (prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength && !shouldUpdateFocusedIndex) ||
656
- flattenedSections.allOptions.length === 0
+ (prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength) ||
+ flattenedSections.allOptions.length === 0 ||
657
+ (flattenedSections.selectedOptions.length !== prevSelectedOptionsLength && shouldUpdateFocusedIndex)
658
) {
659
return;
660
}
0 commit comments