From 45ac7d185019c284b6f434cc066dd4df5eeed3d6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:04:51 +0100 Subject: [PATCH] Add hide column option to header cell menu --- .../src/components/grid/cells/HeaderCell.svelte | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte index 3979e1114a..165711c51f 100644 --- a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte @@ -93,6 +93,16 @@ columns.actions.changePrimaryDisplay(column.name) open = false } + + const hideColumn = () => { + columns.update(state => { + const index = state.findIndex(col => col.name === column.name) + state[index].visible = false + return state.slice() + }) + columns.actions.saveChanges() + open = false + }
Move right + Hide column