Browse Source

fix(gui): inject readonly property to cell

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4861/head
Pranav C 2 years ago
parent
commit
29ff2cd0db
  1. 2
      packages/nc-gui/components/cell/Checkbox.vue
  2. 2
      packages/nc-gui/components/smartsheet/Grid.vue

2
packages/nc-gui/components/cell/Checkbox.vue

@ -65,7 +65,7 @@ useSelectedCellKeyupListener(active, (e) => {
<div <div
class="flex cursor-pointer" class="flex cursor-pointer"
:class="{ :class="{
'justify-center': !isForm && !readOnly, 'justify-center': !isForm,
'w-full': isForm, 'w-full': isForm,
'nc-cell-hover-show': !vModel && !readOnly, 'nc-cell-hover-show': !vModel && !readOnly,
'opacity-0': readOnly && !vModel, 'opacity-0': readOnly && !vModel,

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -806,6 +806,7 @@ const closeAddColumnDropdown = () => {
:active="activeCell.col === colIndex && activeCell.row === rowIndex" :active="activeCell.col === colIndex && activeCell.row === rowIndex"
:row="row" :row="row"
@navigate="onNavigate" @navigate="onNavigate"
:read-only="readOnly"
/> />
<LazySmartsheetCell <LazySmartsheetCell
@ -821,6 +822,7 @@ const closeAddColumnDropdown = () => {
@save="updateOrSaveRow(row, columnObj.title, state)" @save="updateOrSaveRow(row, columnObj.title, state)"
@navigate="onNavigate" @navigate="onNavigate"
@cancel="editEnabled = false" @cancel="editEnabled = false"
:read-only="readOnly"
/> />
</div> </div>
</SmartsheetTableDataCell> </SmartsheetTableDataCell>

Loading…
Cancel
Save