Skip to content

Commit 93e4893

Browse files
committed
feat(core-editor): refactor xray balancer strategy settings management
1 parent 58a3cec commit 93e4893

2 files changed

Lines changed: 352 additions & 469 deletions

File tree

dashboard/src/features/core-editor/components/shared/core-editor-data-table.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

125127
export 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>

0 commit comments

Comments
 (0)