Browse Source

fix(nc-gui): allow vertical resize for rich text input in form view (#8684)

* fix(nc-gui): allow vertical resize for rich text input in form view

* chore(nc-gui): lint
pull/8694/head
Ramesh Mane 3 weeks ago committed by GitHub
parent
commit
64a1ed7f7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/nc-gui/components/cell/RichText.vue
  2. 6
      packages/nc-gui/components/cell/TextArea.vue
  3. 1
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

11
packages/nc-gui/components/cell/RichText.vue

@ -405,6 +405,17 @@ onClickOutside(editorDom, (e) => {
}
}
}
&.allow-vertical-resize:not(.readonly) {
.ProseMirror {
@apply nc-scrollbar-thin;
overflow-y: auto;
overflow-x: hidden;
resize: vertical;
min-width: 100%;
max-height: min(800px, calc(100vh - 200px)) !important;
}
}
}
.nc-rich-text-full {

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

@ -209,16 +209,15 @@ watch(inputWrapperRef, () => {
>
<div v-if="isForm && isRichMode" class="w-full">
<div
class="w-full relative w-full px-0 pb-1"
class="w-full relative w-full px-0"
:class="{
'pt-11': !readOnly,
}"
>
<LazyCellRichText
v-model:value="vModel"
class="!max-h-50"
:class="{
'border-t-1 border-gray-100': !readOnly,
'border-t-1 border-gray-100 allow-vertical-resize': !readOnly,
}"
:autofocus="false"
show-menu
@ -256,6 +255,7 @@ watch(inputWrapperRef, () => {
}"
:style="{
minHeight: isForm ? '117px' : `${height}px`,
maxHeight: 'min(800px, calc(100vh - 200px))',
}"
:disabled="readOnly"
@blur="editEnabled = false"

1
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -1026,7 +1026,6 @@ export default {
@apply !xs:(h-full);
}
.nc-data-cell {
@apply !rounded-lg;
transition: all 0.3s;

Loading…
Cancel
Save