You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If menu panels are constructed manually by the consumer, the first item to focus can be set by using initialFocusedItemIndex. However if using the EuiContextMenuPanelDescriptor approach (passing panels into an EuiContextMenu element), it's automatically set to 0 if keyboard navigation is used which might not always be the desired behavior (e.g. elastic/kibana#81058)
I can imagine extending EuiContextMenuPanelDescriptor by initialFocusedItemIndex and using that in favor of 0 if set.
thompsongl
changed the title
Allow specifying initialFocusedItemIndex for panel created by EuiContextMenuPanelDescriptor
[EuiContextMenuPanelDescriptor] Allow specifying initialFocusedItemIndex for panel
Nov 3, 2020
If menu panels are constructed manually by the consumer, the first item to focus can be set by using
initialFocusedItemIndex
. However if using the EuiContextMenuPanelDescriptor approach (passingpanels
into anEuiContextMenu
element), it's automatically set to 0 if keyboard navigation is used which might not always be the desired behavior (e.g. elastic/kibana#81058)I can imagine extending
EuiContextMenuPanelDescriptor
byinitialFocusedItemIndex
and using that in favor of0
if set.This is where the new prop would be hooked in
https://github.com/elastic/eui/blob/master/src/components/context_menu/context_menu.tsx#L388
The text was updated successfully, but these errors were encountered: