From 6ee3a1dd5f66691456c9e0340da81ecb282a022c Mon Sep 17 00:00:00 2001 From: Filip Solecki Date: Wed, 31 Jan 2024 11:18:25 +0100 Subject: [PATCH] Fix active state (212,211) --- src/pages/WorkspaceSwitcherPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/WorkspaceSwitcherPage.js b/src/pages/WorkspaceSwitcherPage.js index 05edef8fc2bd..e6cd8f5ff9a7 100644 --- a/src/pages/WorkspaceSwitcherPage.js +++ b/src/pages/WorkspaceSwitcherPage.js @@ -261,8 +261,8 @@ function WorkspaceSwitcherPage({policies}) { showTitleTooltip={false} contentContainerStyles={[styles.pt0, styles.mt0]} textIconLeft={MagnifyingGlass} - // It has to be set to null or -1 to avoid focus on any element at the beggining - initiallyFocusedOptionKey={null} + // Null is to avoid selecting unfocused option when Global selected, undefined is to focus selected workspace + initiallyFocusedOptionKey={!activeWorkspaceID ? null : undefined} /> ) : (