diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4a18c47f0..bb4f6b9d6a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Updated TS def for `EuiFilterSelect` ([#2291](https://github.com/elastic/eui/pull/2291)) - Fixed alignment of icons and label in `EuiSideNavItem` ([#2297](https://github.com/elastic/eui/pull/2297)) +- Fixed logic in `EuiContextMenu` to account for index of `0` ([#2304](https://github.com/elastic/eui/pull/2304)) ## [`13.8.0`](https://github.com/elastic/eui/tree/v13.8.0) diff --git a/src/components/context_menu/context_menu.tsx b/src/components/context_menu/context_menu.tsx index 87b4e526739..aa23f9958e2 100644 --- a/src/components/context_menu/context_menu.tsx +++ b/src/components/context_menu/context_menu.tsx @@ -178,7 +178,7 @@ export class EuiContextMenu extends Component { } showNextPanel = (itemIndex?: number) => { - if (!itemIndex) { + if (itemIndex == null) { return; }