diff --git a/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue index 07dc46b865..9c6670a33b 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue @@ -226,6 +226,44 @@ const toggleSystemFields = (e: CheckboxChangeEvent) => { }) } +const onShowAll = () => { + addUndo({ + undo: { + fn: async () => { + await hideAll() + }, + args: [], + }, + redo: { + fn: async () => { + await showAll() + }, + args: [], + }, + scope: activeView.value?.title, + }) + showAll() +} + +const onHideAll = () => { + addUndo({ + undo: { + fn: async () => { + await showAll() + }, + args: [], + }, + redo: { + fn: async () => { + await hideAll() + }, + args: [], + }, + scope: activeView.value?.title, + }) + hideAll() +} + useMenuCloseOnEsc(open) @@ -336,12 +374,12 @@ useMenuCloseOnEsc(open)