File tree Expand file tree Collapse file tree
dashboard/src/features/core-editor/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ export interface CoreEditorDataTableProps<TData> {
120120 /** Values matched against the search query (substring, case-insensitive). Defaults to JSON.stringify(row). */
121121 getSearchableText ?: ( item : TData ) => string
122122 searchPlaceholder ?: string
123+ /** Optional controls rendered next to the grid/list view toggle. */
124+ toolbarActions ?: ReactNode
123125}
124126
125127export function CoreEditorDataTable < TData > ( {
@@ -140,6 +142,7 @@ export function CoreEditorDataTable<TData>({
140142 sortingDisabled = false ,
141143 getSearchableText,
142144 searchPlaceholder,
145+ toolbarActions,
143146} : CoreEditorDataTableProps < TData > ) {
144147 const { t, i18n } = useTranslation ( )
145148 const dir = useDirDetection ( )
@@ -514,7 +517,8 @@ export function CoreEditorDataTable<TData>({
514517 </ button >
515518 ) : null }
516519 </ div >
517- < div className = "flex shrink-0 justify-end sm:justify-start" >
520+ < div className = "flex shrink-0 items-center justify-end gap-2 sm:justify-start" >
521+ { toolbarActions }
518522 < ViewToggle value = { viewMode } onChange = { setViewMode } />
519523 </ div >
520524 </ div >
You can’t perform that action at this time.
0 commit comments