fix(stacks): show containers table [EE-5487] (#8935)

pull/5116/merge
Chaim Lev-Ari 2 years ago committed by GitHub
parent e6984c5787
commit 23e3cdb193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,7 @@ import { TableSettingsProvider } from '@@/datatables/useTableSettings';
import { useTableState } from '@@/datatables/useTableState';
import { useContainers } from '../../containers/queries/containers';
import { RowProvider } from '../../containers/ListView/ContainersDatatable/RowContext';
const storageKey = 'stack-containers';
const settingsStore = createStore(storageKey);
@ -51,6 +52,7 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
);
return (
<RowProvider context={{ environment }}>
<TableSettingsProvider settings={settingsStore}>
<Datatable
title="Containers"
@ -81,7 +83,9 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
onChange={(hiddenColumns) => {
tableState.setHiddenColumns(hiddenColumns);
tableInstance.setColumnVisibility(
Object.fromEntries(hiddenColumns.map((col) => [col, false]))
Object.fromEntries(
hiddenColumns.map((col) => [col, false])
)
);
}}
value={tableState.hiddenColumns}
@ -99,5 +103,6 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
emptyContentLabel="No containers found"
/>
</TableSettingsProvider>
</RowProvider>
);
}

Loading…
Cancel
Save