mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(docker/services): convert services table to react [EE-4675] (#10289)
This commit is contained in:
parent
6b5c24faff
commit
0dc1805881
46 changed files with 969 additions and 850 deletions
|
@ -17,19 +17,12 @@ export function TableSettingsMenus({
|
|||
tableInstance: Table<DecoratedStack>;
|
||||
tableState: TableSettings;
|
||||
}) {
|
||||
const columnsToHide = tableInstance
|
||||
.getAllColumns()
|
||||
.filter((col) => col.getCanHide());
|
||||
|
||||
return (
|
||||
<>
|
||||
<ColumnVisibilityMenu<DecoratedStack>
|
||||
columns={columnsToHide}
|
||||
table={tableInstance}
|
||||
onChange={(hiddenColumns) => {
|
||||
tableState.setHiddenColumns(hiddenColumns);
|
||||
tableInstance.setColumnVisibility(
|
||||
Object.fromEntries(hiddenColumns.map((col) => [col, false]))
|
||||
);
|
||||
}}
|
||||
value={tableState.hiddenColumns}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue