Repository navigation
[EuiBasicTable/EuiInMemoryTable] Add panelled prop and layout - #9717
Conversation
… create custom panels integrated with EuiBasicTable or EuiInMemoryTable
…ordered) look and feel
…o a subdirectory and add panelled look and feel support
| /** | ||
| * @internal | ||
| */ | ||
| export const euiBasicTableWrapperPanelledStyles = |
There was a problem hiding this comment.
This is structured this way because EuiBasicTable is a class component and adding a RenderWithEuiTheme wrapper as the first node would be rather heavy in terms of snapshot changes needed. I tried using the withEuiTheme HOC but that resulted in something similar.
We'll rewrite these table components to function components someday...
| `${euiTheme.size.xs} ${euiTheme.size.s}` | ||
| )} | ||
| `, | ||
| panelled: css` |
There was a problem hiding this comment.
This could theoretically reuse the styles defined in the euiBasicTablePanelStyles hook but I decided to keep them separate. It felt easier to follow this way.
| ); | ||
| }; | ||
|
|
||
| export const Panelled: Story = { |
There was a problem hiding this comment.
We're missing a setup for the panelled control in storybook, it's currently not available.
There was a problem hiding this comment.
Tiny additional note: We should probably add it here to move it to the table props, as it's inherited.
There was a problem hiding this comment.
I though about it but it's not inherited from EuiTable. This prop is part of EuiBasicTable. WDYT?
There was a problem hiding this comment.
Ah true, right! 😅 We could add a new section for it. Otherwise it's also ok as is.
|
Also a reminder: we should run VRT 😄 |
Co-authored-by: Lene Gadewoll <[email protected]>
mgadewoll
left a comment
There was a problem hiding this comment.
🟢 Changes are LGTM. Tested locally, the new prop works as expected. 🎉
Thanks for the additional updates!
💚 Build Succeeded
History
cc @tkajtoch |
💚 Build SucceededHistory
cc @tkajtoch |
## 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]>
## 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]>
## 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]>
Summary
Resolves https://github.com/elastic/eui-private/issues/658.
This PR adds the panelled layout to
<EuiInMemoryTable>and<EuiBasicTable>that can be enabled with the newpanelled(boolean, defaults tofalse) prop.API Changes
EuiInMemoryTable,EuiBasicTablepanelledpanelledprop that enables the panelled layout in tables. It increases contrast by adding a shade to the pagination bar and adds a wrapping border. It's possible to create custom panels for toolbars with matching styles by using the newuseEuiBasicTablePanelPropshook.EuiInMemoryTable,EuiBasicTableuseEuiBasicTablePanelPropsEuiInMemoryTable'schildrenBetweenor rendered on top ofEuiBasicTable.Screenshots
Custom panels
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.Impact level: 🟢 Low
Release Readiness
Migration guide: {steps or link, for breaking/visual changes or deprecations}QA instructions for reviewer
Checklist before marking Ready for Review
Tests: Added/updated Jest, Cypress, and VRTBreaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist