Browse Source

fix: Now dbl click and enter on selected rich cell opens the modal and click to open is removed, and the cell active border is maintained after opening rich modal

pull/7046/head
Muhammed Mustafa 1 year ago
parent
commit
e37d26d0cd
  1. 9
      packages/nc-gui/components/cell/TextArea.vue
  2. 3
      packages/nc-gui/components/smartsheet/grid/Table.vue

9
packages/nc-gui/components/cell/TextArea.vue

@ -154,6 +154,12 @@ const dragStart = () => {
isDragging.value = true
}
watch(editEnabled, () => {
if (editEnabled.value) {
isVisible.value = true
}
})
</script>
<template>
@ -179,7 +185,7 @@ const dragStart = () => {
maxHeight: `${height}px !important`,
minHeight: `${height}px !important`,
}"
@click="onExpand"
@dblclick="onExpand"
>
<LazyCellRichText v-model:value="vModel" sync-value-change readonly class="!pointer-events-none" />
</div>
@ -227,6 +233,7 @@ const dragStart = () => {
<span v-else>{{ vModel }}</span>
<NcTooltip
v-if="!isVisible"
placement="bottom"
class="!absolute right-0 bottom-1 !hidden nc-text-area-expand-btn"
:class="{ 'right-0 bottom-2': editEnabled }"

3
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -761,6 +761,9 @@ onClickOutside(tableBodyEl, (e) => {
if (activeCell.row === null || activeCell.col === null) return
const isRichModalOpen = isExpandedCellInputExist()
if (isRichModalOpen) return
const activeCol = fields.value[activeCell.col]
if (editEnabled.value && (isVirtualCol(activeCol) || activeCol.uidt === UITypes.JSON)) return

Loading…
Cancel
Save