Skip to content

Commit

Permalink
[bonus] Fix incorrect selection state on API key format dropdown
Browse files Browse the repository at this point in the history
`* 2` index is unnecessary, EuiContextMenuPanel accounts for non-interactive elements
  • Loading branch information
cee-chen committed Sep 18, 2024
1 parent b0418cd commit 661273c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const SelectableTokenField: FunctionComponent<SelectableTokenFieldProps>
closePopover={closePopover}
>
<EuiContextMenuPanel
initialFocusedItemIndex={selectedIndex * 2}
initialFocusedItemIndex={selectedIndex}
items={options.reduce<ReactElement[]>((items, option, i) => {
items.push(
<EuiContextMenuItem
Expand Down

0 comments on commit 661273c

Please sign in to comment.