Repository navigation
[EuiFlyoutMenu] Add pagination controls with previous/next buttons and counter V2 - #9726
Merged
paulinashakirova merged 6 commits intoJun 18, 2026
Merged
Conversation
…/next buttons and counter" (elastic#9725)" This reverts commit 6c00d51.
paulinashakirova
marked this pull request as ready for review
June 18, 2026 11:15
Contributor
There was a problem hiding this comment.
Pull request overview
Adds pagination controls to EuiFlyoutMenu and introduces a flyout-manager store API to support cross-React-root pagination state, enabling Prev/Next navigation and an N of total counter in flyout menu bars.
Changes:
- Added
flyoutMenuProps.pagination(with Prev/Next controls + counter) toEuiFlyoutMenu - Added flyout manager
setPagination()action/store support +useFlyoutPagination()selector hook - Added docs, Storybook examples (prop-based + cross-root), and Jest coverage for reducer/store/menu UI
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/website/docs/components/containers/flyout/_flyout_menu.mdx | Embeds new pagination docs section into flyout menu documentation |
| packages/website/docs/components/containers/flyout/_flyout_menu_pagination.mdx | New MDX example/docs for flyoutMenuProps.pagination |
| packages/eui/src/components/flyout/use_flyout_menu.ts | Treats pagination as “menu has meaningful content” when total > 1 |
| packages/eui/src/components/flyout/manager/types.ts | Persists pagination config on managed flyout state + exposes API type |
| packages/eui/src/components/flyout/manager/store.ts | Adds setPagination() dispatch wrapper to the manager store |
| packages/eui/src/components/flyout/manager/store.test.ts | Tests store setPagination() behavior and subscriber notifications |
| packages/eui/src/components/flyout/manager/selectors.ts | Adds useFlyoutPagination() selector |
| packages/eui/src/components/flyout/manager/reducer.ts | Adds reducer case for ACTION_SET_PAGINATION |
| packages/eui/src/components/flyout/manager/reducer.test.ts | Adds reducer unit tests for pagination set/clear/no-op behavior |
| packages/eui/src/components/flyout/manager/index.ts | Re-exports setPaginationAction and useFlyoutPagination |
| packages/eui/src/components/flyout/manager/hooks.ts | Re-exports useFlyoutPagination via the hooks barrel |
| packages/eui/src/components/flyout/manager/flyout_sessions.stories.tsx | Adds “Cross-root pagination” Storybook example using the singleton store |
| packages/eui/src/components/flyout/manager/flyout_managed.tsx | Merges store vs prop pagination (store wins) and suppresses back/history UI |
| packages/eui/src/components/flyout/manager/flyout_managed.test.tsx | Updates mocks to include the new useFlyoutPagination hook |
| packages/eui/src/components/flyout/manager/actions.ts | Adds ACTION_SET_PAGINATION + setPagination() action creator |
| packages/eui/src/components/flyout/manager/mocks/index.ts | Extends manager mocks with setPagination |
| packages/eui/src/components/flyout/index.ts | Re-exports EuiFlyoutMenuPagination type |
| packages/eui/src/components/flyout/flyout_menu.tsx | Implements pagination UI (Prev/Next + counter + SR live announcement) |
| packages/eui/src/components/flyout/flyout_menu.test.tsx | Adds Jest tests for pagination rendering/disabled states/callbacks |
| packages/eui/src/components/flyout/flyout_menu.styles.ts | Adds styling for the pagination counter |
| packages/eui/src/components/flyout/flyout_menu.stories.tsx | Adds prop-based pagination Storybook example |
| packages/eui/changelogs/upcoming/9722.md | Adds changelog entry documenting the new API surface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+228
to
+233
| const prevButton = ( | ||
| <EuiButtonIcon | ||
| iconType="chevronSingleUp" | ||
| color="text" | ||
| size="xs" | ||
| aria-label={prevLabel} |
Contributor
There was a problem hiding this comment.
@paulinashakirova I'll let you handle this one because I don't know what are the design requirements.
weronikaolejniczak
approved these changes
Jun 18, 2026
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuidatagrid (2 differences)
|
5 tasks done
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuipopover (1 difference)
euidatagrid (1 difference)
|
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuipopover (1 difference)
euidatagrid (1 difference)
|
Author
|
buildkite test this |
Author
|
buildkite test this |
Collaborator
💚 Build Succeeded
History
|
Collaborator
💚 Build Succeeded
History
|
Merged
7 of 10 tasks
This was referenced Jun 25, 2026
weronikaolejniczak
added a commit
to elastic/kibana
that referenced
this pull request
Jul 2, 2026
## Dependency updates `@elastic/eui` - v116.3.1 ⏩ v116.5.0 ## Package updates ### `@elastic/eui` [v116.5.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `logoVectorDB` icon glyph ([#9758](elastic/eui#9758)) - Updated logo glyphs to use pure white in dark mode ([#9758](elastic/eui#9758)) ### `@elastic/eui` [v116.4.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `pagination` prop to `EuiFlyoutMenuProps` (`EuiFlyoutMenuPagination`) that renders Previous/Next navigation buttons and a position counter in the flyout menu bar. When provided, the back button is hidden — pagination and back button are mutually exclusive. ([#9726](elastic/eui#9726)) - Added `setPagination(flyoutId, pagination)` to the flyout manager store (`getFlyoutManagerStore()`) and `setPaginationAction` action creator. Calling `setPagination` overrides any declarative `flyoutMenuProps.pagination` and re-renders the menu bar reactively across React roots — useful for imperatively opened flyouts that mount in a separate root and can't update props through normal React reconciliation. ([#9726](elastic/eui#9726)) - Added `useFlyoutPagination(flyoutId)` selector hook that returns the manager-level pagination override for a flyout, if any. ([#9726](elastic/eui#9726)) - Added a new optional `panelled` prop (boolean, defaults to `false`) to `EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout ([#9717](elastic/eui#9717)) - Added `useEuiBasicTablePanelProps` utility hook that provides props and styles necessary to create custom table panels such as toolbars ([#9717](elastic/eui#9717)) - Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback (`onClose(event, { reason })`) describing why the flyout closed: `'close-button'`, `'escape'`, `'outside-click'`, and, for managed flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'` (parent navigated away / main flyout closed) ([#9716](elastic/eui#9716)) - Updated `EuiBanner` by removing the render condition for secondary actions ([#9713](elastic/eui#9713)) - Updated `EuiBanner` to adjust spacing for content passed via the `children` prop ([#9700](elastic/eui#9700)) - Updated `EuiToast` styles ([#9688](elastic/eui#9688)) - Added `text` prop on `EuiToast` which renders the main text. Use this instead of `children` where possible. ([#9688](elastic/eui#9688)) - Added `actionProps` prop on `EuiToast` which renders primary and secondary action buttons. ([#9688](elastic/eui#9688)) - Added `animationMs` prop on `EuiToast`. If set it'll render a reverse loading bar. ([#9688](elastic/eui#9688)) - Added `showNotificationBadge` prop on `EuiGlobalToastList` to optionally show a badge indicating the toast list length. ([#9688](elastic/eui#9688)) --------- Co-authored-by: Weronika Olejniczak <[email protected]>
MykhailoKondrat
pushed a commit
to MykhailoKondrat/kibana
that referenced
this pull request
Jul 2, 2026
## Dependency updates `@elastic/eui` - v116.3.1 ⏩ v116.5.0 ## Package updates ### `@elastic/eui` [v116.5.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `logoVectorDB` icon glyph ([elastic#9758](elastic/eui#9758)) - Updated logo glyphs to use pure white in dark mode ([elastic#9758](elastic/eui#9758)) ### `@elastic/eui` [v116.4.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `pagination` prop to `EuiFlyoutMenuProps` (`EuiFlyoutMenuPagination`) that renders Previous/Next navigation buttons and a position counter in the flyout menu bar. When provided, the back button is hidden — pagination and back button are mutually exclusive. ([elastic#9726](elastic/eui#9726)) - Added `setPagination(flyoutId, pagination)` to the flyout manager store (`getFlyoutManagerStore()`) and `setPaginationAction` action creator. Calling `setPagination` overrides any declarative `flyoutMenuProps.pagination` and re-renders the menu bar reactively across React roots — useful for imperatively opened flyouts that mount in a separate root and can't update props through normal React reconciliation. ([elastic#9726](elastic/eui#9726)) - Added `useFlyoutPagination(flyoutId)` selector hook that returns the manager-level pagination override for a flyout, if any. ([elastic#9726](elastic/eui#9726)) - Added a new optional `panelled` prop (boolean, defaults to `false`) to `EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout ([elastic#9717](elastic/eui#9717)) - Added `useEuiBasicTablePanelProps` utility hook that provides props and styles necessary to create custom table panels such as toolbars ([elastic#9717](elastic/eui#9717)) - Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback (`onClose(event, { reason })`) describing why the flyout closed: `'close-button'`, `'escape'`, `'outside-click'`, and, for managed flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'` (parent navigated away / main flyout closed) ([elastic#9716](elastic/eui#9716)) - Updated `EuiBanner` by removing the render condition for secondary actions ([elastic#9713](elastic/eui#9713)) - Updated `EuiBanner` to adjust spacing for content passed via the `children` prop ([elastic#9700](elastic/eui#9700)) - Updated `EuiToast` styles ([elastic#9688](elastic/eui#9688)) - Added `text` prop on `EuiToast` which renders the main text. Use this instead of `children` where possible. ([elastic#9688](elastic/eui#9688)) - Added `actionProps` prop on `EuiToast` which renders primary and secondary action buttons. ([elastic#9688](elastic/eui#9688)) - Added `animationMs` prop on `EuiToast`. If set it'll render a reverse loading bar. ([elastic#9688](elastic/eui#9688)) - Added `showNotificationBadge` prop on `EuiGlobalToastList` to optionally show a badge indicating the toast list length. ([elastic#9688](elastic/eui#9688)) --------- Co-authored-by: Weronika Olejniczak <[email protected]>
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
Aug 5, 2026
## Dependency updates `@elastic/eui` - v116.3.1 ⏩ v116.5.0 ## Package updates ### `@elastic/eui` [v116.5.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `logoVectorDB` icon glyph ([elastic#9758](elastic/eui#9758)) - Updated logo glyphs to use pure white in dark mode ([elastic#9758](elastic/eui#9758)) ### `@elastic/eui` [v116.4.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `pagination` prop to `EuiFlyoutMenuProps` (`EuiFlyoutMenuPagination`) that renders Previous/Next navigation buttons and a position counter in the flyout menu bar. When provided, the back button is hidden — pagination and back button are mutually exclusive. ([elastic#9726](elastic/eui#9726)) - Added `setPagination(flyoutId, pagination)` to the flyout manager store (`getFlyoutManagerStore()`) and `setPaginationAction` action creator. Calling `setPagination` overrides any declarative `flyoutMenuProps.pagination` and re-renders the menu bar reactively across React roots — useful for imperatively opened flyouts that mount in a separate root and can't update props through normal React reconciliation. ([elastic#9726](elastic/eui#9726)) - Added `useFlyoutPagination(flyoutId)` selector hook that returns the manager-level pagination override for a flyout, if any. ([elastic#9726](elastic/eui#9726)) - Added a new optional `panelled` prop (boolean, defaults to `false`) to `EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout ([elastic#9717](elastic/eui#9717)) - Added `useEuiBasicTablePanelProps` utility hook that provides props and styles necessary to create custom table panels such as toolbars ([elastic#9717](elastic/eui#9717)) - Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback (`onClose(event, { reason })`) describing why the flyout closed: `'close-button'`, `'escape'`, `'outside-click'`, and, for managed flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'` (parent navigated away / main flyout closed) ([elastic#9716](elastic/eui#9716)) - Updated `EuiBanner` by removing the render condition for secondary actions ([elastic#9713](elastic/eui#9713)) - Updated `EuiBanner` to adjust spacing for content passed via the `children` prop ([elastic#9700](elastic/eui#9700)) - Updated `EuiToast` styles ([elastic#9688](elastic/eui#9688)) - Added `text` prop on `EuiToast` which renders the main text. Use this instead of `children` where possible. ([elastic#9688](elastic/eui#9688)) - Added `actionProps` prop on `EuiToast` which renders primary and secondary action buttons. ([elastic#9688](elastic/eui#9688)) - Added `animationMs` prop on `EuiToast`. If set it'll render a reverse loading bar. ([elastic#9688](elastic/eui#9688)) - Added `showNotificationBadge` prop on `EuiGlobalToastList` to optionally show a badge indicating the toast list length. ([elastic#9688](elastic/eui#9688)) --------- Co-authored-by: Weronika Olejniczak <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Summary
What: Adds Prev/Next pagination controls to
EuiFlyoutMenu— the menu bar rendered at the top of every flyout. Two consumption paths are supported:flyoutMenuProps.pagination) — the caller owns pagination state and passes{ currentIndex, total, onPrevious, onNext }directly. Works with both overlay and managed flyouts.getFlyoutManagerStore().setPagination(flyoutId, pagination)) — a separate React root (e.g. a data grid or list mounted independently) pushes pagination state into the flyout manager singleton without needing shared React context. The managed flyout reads and displays it automatically.Why: A common pattern in complex UIs is a list (table, data grid, search results) paired with a detail flyout — users expect to step through items without closing and reopening the flyout. When list and flyout share a React tree the prop-based path covers this. When they live in separate React roots (e.g. independently mounted micro-frontends or portals), the store-based path lets the list push navigation state into the flyout manager without shared context or prop drilling.
(There is a corresponding Epic on Kibana's side (#3152). Reach out for the link)
How:
PaginationControlsis an internal component rendered in the left slot ofEuiFlyoutMenu. Per the design spec (see image below), the left slot holds either back-button + history or pagination — not both. Whenpagination.total > 1, pagination takes precedence and the back button is suppressed.setPaginationaction/reducer that silently no-ops for unregistered flyout IDs (overlay/unmanaged flyouts receive pagination via the prop instead).EuiManagedFlyoutmerges both sources with store-wins precedence (storePagination ?? propPagination). Using both simultaneously logs a dev warning.arrowUp/arrowDownper the design spec (vertical list/data navigation, not horizontal).aria-hidden="true"and duplicated insideEuiScreenReaderLivefor assistive technology.API Changes
EuiFlyoutMenupaginationEuiFlyoutMenuPagination— enables Prev/Next controls and a position counter (N of total) in the menu barEuiFlyoutMenuPagination{ currentIndex: number, total: number, onPrevious: () => void, onNext: () => void }— zero-based indexFlyoutManagerApisetPagination(flyoutId, pagination)EuiManagedFlyoutStatepaginationuseFlyoutPaginationmanager/index.ts)Screenshots
N of total/ Next ↓ in the menu bar left slotImpact Assessment
paginationprop is provided orsetPaginationis called. No change to existing flyout appearance.EuiFlyoutMenu(pagination block), reducer, store, and selectors. Snapshot baseline unchanged for existing tests.Impact level: 🟢 Low — purely additive, no changes to existing rendered output.
Release Readiness
EuiFlyoutMenuand "Cross-root pagination" in Flyout Manager.setPaginationAPI is designed for consumers where the list and flyout live in separate React roots.QA instructions for reviewer
Prop-based pagination — Storybook: Layout > EuiFlyout > EuiFlyoutMenu > Pagination (prop-based)
N of 5) and the flyout body content.total ≤ 1.Store-based / cross-root pagination — Storybook: Layout > EuiFlyout > Flyout Manager > Cross-root pagination
onPrevious/onNextcallbacks update the data grid root'scurrentIndex, which re-callssetPagination).Keyboard / accessibility
Checklist before marking Ready for Review
flyout_menu.test.tsx, reducer, store, selectors)packages/eui/changelogs/upcoming/9722.md)Reviewer checklist
Design