Skip to content

Commit da88626

Browse files
Fix scrolling of country page
1 parent 0a8574f commit da88626

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/SelectionList/BaseSelectionList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,9 @@ function BaseSelectionList<TItem extends ListItem>(
652652
useEffect(() => {
653653
// Avoid changing focus if the textInputValue remains unchanged.
654654
if (
655-
(prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength && !shouldUpdateFocusedIndex) ||
656-
flattenedSections.allOptions.length === 0
655+
(prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength) ||
656+
flattenedSections.allOptions.length === 0 ||
657+
(flattenedSections.selectedOptions.length !== prevSelectedOptionsLength && shouldUpdateFocusedIndex)
657658
) {
658659
return;
659660
}

0 commit comments

Comments
 (0)