From a90c2437e71f806f6f29bf499d352fd1d5c5710d Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Wed, 17 Jan 2024 07:24:59 +0000 Subject: [PATCH] fix(nc-gui): review changes PR #2122 --- packages/nc-gui/components/cell/RichText.vue | 23 ++++++++++---------- packages/nc-gui/components/cell/TextArea.vue | 8 +++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/packages/nc-gui/components/cell/RichText.vue b/packages/nc-gui/components/cell/RichText.vue index 581517c2a9..413e01302a 100644 --- a/packages/nc-gui/components/cell/RichText.vue +++ b/packages/nc-gui/components/cell/RichText.vue @@ -12,7 +12,7 @@ import { RowHeightInj, IsExpandedFormOpenInj } from '#imports' const props = defineProps<{ value?: string | null - readonly?: boolean + readOnly?: boolean syncValueChange?: boolean showMenu?: boolean fullMode?: boolean @@ -119,7 +119,7 @@ const editor = useEditor({ vModel.value = markdown }, - editable: !props.readonly, + editable: !props.readOnly, }) const setEditorContent = (contentMd: any, focusEndOfDoc?: boolean) => { @@ -170,17 +170,17 @@ watch(editorDom, () => {
@@ -194,11 +194,10 @@ watch(editorDom, () => { :editor="editor" class="flex flex-col nc-textarea-rich-editor w-full" :class="{ - 'mt-2.5 flex-grow': props.fullMode, - 'nc-scrollbar-md': (!props.fullMode && !props.readonly) || isExpandedFormOpen, + 'mt-2.5 flex-grow': fullMode, + 'nc-scrollbar-md': !fullMode || (!fullMode && isExpandedFormOpen), 'flex-grow': isExpandedFormOpen, - [`!overflow-hidden children:line-clamp-${rowHeight}`]: - !props.fullMode && props.readonly && rowHeight && !isExpandedFormOpen, + [`!overflow-hidden children:line-clamp-${rowHeight}`]: !fullMode && readOnly && rowHeight && !isExpandedFormOpen, }" />
@@ -242,7 +241,7 @@ watch(editorDom, () => { min-height: 215px; max-height: min(797px, calc(100vh - 170px)); min-width: 256px; - max-width: min(1256px, 100vw - 124px); + max-width: min(1256px, 100vw - 126px); } &.readonly { .ProseMirror { diff --git a/packages/nc-gui/components/cell/TextArea.vue b/packages/nc-gui/components/cell/TextArea.vue index 9c9a7d9f04..250ede61ff 100644 --- a/packages/nc-gui/components/cell/TextArea.vue +++ b/packages/nc-gui/components/cell/TextArea.vue @@ -220,7 +220,7 @@ watch(inputWrapperRef, () => { @dblclick="onExpand" @keydown.enter="onExpand" > - +