From a5f2302a14d470b4ef84897203c044b03662ebb2 Mon Sep 17 00:00:00 2001 From: sreehari jayaraj Date: Sat, 30 Sep 2023 23:24:37 +0530 Subject: [PATCH 1/2] feat: disabled cell ui --- packages/nc-gui/components/smartsheet/grid/Table.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue index 5250127c6c..49ea65d02d 100644 --- a/packages/nc-gui/components/smartsheet/grid/Table.vue +++ b/packages/nc-gui/components/smartsheet/grid/Table.vue @@ -1429,6 +1429,10 @@ const handleCellClick = (event: MouseEvent, row: number, col: number) => { 'align-middle': !rowHeight || rowHeight === 1, 'align-top': rowHeight && rowHeight !== 1, 'filling': isCellInFillRange(rowIndex, colIndex), + '!bg-gray-50 readonly': + (isLookup(columnObj) || isRollup(columnObj) || isFormula(columnObj)) && + hasEditPermission && + isCellSelected(rowIndex, colIndex), }" :data-testid="`cell-${columnObj.title}-${rowIndex}`" :data-key="`data-key-${rowIndex}-${columnObj.id}`" @@ -1771,6 +1775,10 @@ const handleCellClick = (event: MouseEvent, row: number, col: number) => { @apply text-primary border-current bg-primary bg-opacity-5; } + td.active.readonly::after { + @apply text-primary bg-primary bg-opacity-5 !border-gray-200; + } + td.active-cell::after { @apply border-1 border-solid text-primary border-current bg-primary bg-opacity-3; } From cf214a6c0a4ae97623a38ef6a8c17597f6955035 Mon Sep 17 00:00:00 2001 From: sreehari jayaraj Date: Sat, 30 Sep 2023 23:37:21 +0530 Subject: [PATCH 2/2] fix: (refactor) moved css to scss --- packages/nc-gui/components/smartsheet/grid/Table.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue index 49ea65d02d..5aee5fd267 100644 --- a/packages/nc-gui/components/smartsheet/grid/Table.vue +++ b/packages/nc-gui/components/smartsheet/grid/Table.vue @@ -1429,7 +1429,7 @@ const handleCellClick = (event: MouseEvent, row: number, col: number) => { 'align-middle': !rowHeight || rowHeight === 1, 'align-top': rowHeight && rowHeight !== 1, 'filling': isCellInFillRange(rowIndex, colIndex), - '!bg-gray-50 readonly': + 'readonly': (isLookup(columnObj) || isRollup(columnObj) || isFormula(columnObj)) && hasEditPermission && isCellSelected(rowIndex, colIndex), @@ -1776,7 +1776,7 @@ const handleCellClick = (event: MouseEvent, row: number, col: number) => { } td.active.readonly::after { - @apply text-primary bg-primary bg-opacity-5 !border-gray-200; + @apply text-primary bg-grey-50 bg-opacity-5 !border-gray-200; } td.active-cell::after {