From cc7df3d8f7c633c215dc3804d55aecf01b15d230 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Wed, 28 Jan 2026 17:56:51 +0100 Subject: [PATCH 1/2] Fix destination picker behavior --- src/components/DestinationPicker.tsx | 3 --- src/components/SelectionList/hooks/useFlattenedSections.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/DestinationPicker.tsx b/src/components/DestinationPicker.tsx index e7c4fd5146b56..27596b6fa2437 100644 --- a/src/components/DestinationPicker.tsx +++ b/src/components/DestinationPicker.tsx @@ -76,7 +76,6 @@ function DestinationPicker({selectedDestination, policyID, onSubmit, ref}: Desti return ( ); } diff --git a/src/components/SelectionList/hooks/useFlattenedSections.ts b/src/components/SelectionList/hooks/useFlattenedSections.ts index 6ea493e2d92c8..6e0e78bb09e21 100644 --- a/src/components/SelectionList/hooks/useFlattenedSections.ts +++ b/src/components/SelectionList/hooks/useFlattenedSections.ts @@ -67,7 +67,7 @@ function useFlattenedSections(sections: Array; data.push(itemData); - if (item.keyForList === initiallyFocusedItemKey) { + if (item.keyForList === initiallyFocusedItemKey && focusedIndex === -1) { focusedIndex = currentIndex; } From 5dd90339187421946e36b0ab58b13f04ab406dce Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Wed, 28 Jan 2026 18:34:21 +0100 Subject: [PATCH 2/2] Add shouldUpdateFocusedIndex prop --- src/components/DestinationPicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/DestinationPicker.tsx b/src/components/DestinationPicker.tsx index 27596b6fa2437..9f1ec98ad210a 100644 --- a/src/components/DestinationPicker.tsx +++ b/src/components/DestinationPicker.tsx @@ -83,6 +83,7 @@ function DestinationPicker({selectedDestination, policyID, onSubmit, ref}: Desti ListItem={RadioListItem} initiallyFocusedItemKey={selectedOptionKey} shouldHideKeyboardOnScroll={false} + shouldUpdateFocusedIndex /> ); }