diff --git a/packages/dashboard-ui-components/src/components/data-grid/data-grid-toolbar.tsx b/packages/dashboard-ui-components/src/components/data-grid/data-grid-toolbar.tsx index 43165601e..38ec1f9b0 100644 --- a/packages/dashboard-ui-components/src/components/data-grid/data-grid-toolbar.tsx +++ b/packages/dashboard-ui-components/src/components/data-grid/data-grid-toolbar.tsx @@ -271,13 +271,13 @@ export function DataGridToolbar({ ctx, extra, extraLeading, + extraActions, hideQuickSearch, }: { ctx: DataGridToolbarContext; - /** Extra content rendered inside the toolbar row, to the left of the - * built-in columns / export actions. Use this to add table-specific - * affordances (refresh, custom toggles, row counts) without giving up - * the default actions. */ + /** Extra content in the leading cluster, after search / `extraLeading` + * (filters, status badges, row counts). Stays with the search side so + * it doesn't compete with the trailing icon actions. */ extra?: React.ReactNode; /** Extra content rendered at the START of the toolbar row — occupies * the same position as the built-in quick search (after it, if the @@ -285,6 +285,10 @@ export function DataGridToolbar({ * to fully replace the quick search with a custom input, e.g. an * AI-powered search bar. */ extraLeading?: React.ReactNode; + /** Extra content in the trailing action cluster, immediately before + * the built-in columns / export buttons (e.g. a labeled Refresh). + * When present, a hairline divider separates it from those icons. */ + extraActions?: React.ReactNode; /** Whether to hide the built-in quick-search input. When `true`, * callers are expected to provide their own search UI via * `extraLeading`. */ @@ -328,7 +332,7 @@ export function DataGridToolbar({ ); return ( -
+
{!hideQuickSearch && ( ({ {extraLeading} {extra}
-
+
+ {extraActions != null && ( + <> + {extraActions} +
+ + )}
columnPopover.setOpen(!columnPopover.open)}