From f09e80b9f38d4fe66187d4361e3c6856295befbb Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 9 Nov 2023 07:17:47 +0000 Subject: [PATCH] fix: Added copy/cell selection in share view grid --- .../components/smartsheet/grid/Table.vue | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue index e12620dd12..77898830c4 100644 --- a/packages/nc-gui/components/smartsheet/grid/Table.vue +++ b/packages/nc-gui/components/smartsheet/grid/Table.vue @@ -181,7 +181,7 @@ const gridRect = useElementBounding(gridWrapper) // #Permissions const { isUIAllowed } = useRoles() -const hasEditPermission = computed(() => isUIAllowed('dataEdit')) +const hasEditPermission = computed(() => isUIAllowed('dataEdit') && !isLocked.value) const isAddingColumnAllowed = computed(() => !readOnly.value && !isLocked.value && isUIAllowed('fieldAdd') && !isSqlView.value) const { onDrag, onDragStart, draggedCol, dragColPlaceholderDomRef, toBeDroppedColId } = useColumnDrag({ @@ -223,9 +223,7 @@ const _contextMenu = ref(false) const contextMenu = computed({ get: () => _contextMenu.value, set: (val) => { - if (hasEditPermission.value) { - _contextMenu.value = val - } + _contextMenu.value = val }, }) const contextMenuClosing = ref(false) @@ -1549,14 +1547,12 @@ onKeyStroke('ArrowDown', onDown) +