Skip to content

Commit 0a8574f

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

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/SelectionList/BaseSelectionList.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,8 @@ 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) ||
656-
flattenedSections.allOptions.length === 0 ||
657-
shouldUpdateFocusedIndex
655+
(prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength && !shouldUpdateFocusedIndex) ||
656+
flattenedSections.allOptions.length === 0
658657
) {
659658
return;
660659
}

0 commit comments

Comments
 (0)