From 06549149b6867acac854751a85aa42c77f64f30f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 29 May 2024 16:01:11 +0200 Subject: [PATCH] Remove readonly --- .../components/grid/controls/ColumnsSettingButton.svelte | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte index 2608eea75f..c3ce6d2743 100644 --- a/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte +++ b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte @@ -13,9 +13,8 @@ const toggleColumn = async (column, permission) => { const visible = permission !== PERMISSION_OPTIONS.HIDDEN - const readonly = permission === PERMISSION_OPTIONS.READONLY - datasource.actions.addSchemaMutation(column.name, { visible, readonly }) + datasource.actions.addSchemaMutation(column.name, { visible }) await datasource.actions.saveSchemaMutations() dispatch(visible ? "show-column" : "hide-column") } @@ -27,13 +26,11 @@ const PERMISSION_OPTIONS = { WRITABLE: "writable", - READONLY: "readonly", HIDDEN: "hidden", } const options = [ { icon: "Edit", value: PERMISSION_OPTIONS.WRITABLE }, - { icon: "Visibility", value: PERMISSION_OPTIONS.READONLY }, { icon: "VisibilityOff", value: PERMISSION_OPTIONS.HIDDEN }, ] @@ -42,10 +39,6 @@ return PERMISSION_OPTIONS.HIDDEN } - if (column.readonly) { - return PERMISSION_OPTIONS.READONLY - } - return PERMISSION_OPTIONS.WRITABLE }