Browse Source

Merge pull request #6387 from nocodb/fix/longtext-expand

fix(nc-gui): long text expand in shared view
pull/6394/head
Raju Udava 1 year ago committed by GitHub
parent
commit
3b83f22237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/nc-gui/components/cell/TextArea.vue
  2. 2
      packages/nc-gui/components/smartsheet/Cell.vue

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

@ -10,6 +10,7 @@ import {
iconMap, iconMap,
inject, inject,
useVModel, useVModel,
ReadonlyInj
} from '#imports' } from '#imports'
const props = defineProps<{ const props = defineProps<{
@ -47,6 +48,8 @@ const inputRef = ref<HTMLTextAreaElement | null>(null)
const active = inject(ActiveCellInj, ref(false)) const active = inject(ActiveCellInj, ref(false))
const readOnly = inject(ReadonlyInj)
watch(isVisible, () => { watch(isVisible, () => {
if (isVisible.value) { if (isVisible.value) {
setTimeout(() => { setTimeout(() => {
@ -133,11 +136,12 @@ onClickOutside(inputWrapperRef, (e) => {
ref="inputRef" ref="inputRef"
v-model:value="vModel" v-model:value="vModel"
placeholder="Enter text" placeholder="Enter text"
class="p-1 !pt-1 !pr-3 !border-0 !border-r-0 !focus:outline-transparent nc-scrollbar-md" class="p-1 !pt-1 !pr-3 !border-0 !border-r-0 !focus:outline-transparent nc-scrollbar-md !text-black"
:bordered="false" :bordered="false"
:auto-size="{ minRows: 20, maxRows: 20 }" :auto-size="{ minRows: 20, maxRows: 20 }"
@keydown.stop @keydown.stop
@keydown.escape="isVisible = false" @keydown.escape="isVisible = false"
:disabled="readOnly"
/> />
</div> </div>
</template> </template>

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

@ -249,7 +249,7 @@ onUnmounted(() => {
<LazyCellJson v-else-if="isJSON(column)" v-model="vModel" /> <LazyCellJson v-else-if="isJSON(column)" v-model="vModel" />
<LazyCellText v-else v-model="vModel" /> <LazyCellText v-else v-model="vModel" />
<div <div
v-if="(isLocked || (isPublic && readOnly && !isForm) || isSystemColumn(column)) && !isAttachment(column)" v-if="(isLocked || (isPublic && readOnly && !isForm) || isSystemColumn(column)) && !isAttachment(column) && !isTextArea(column)"
class="nc-locked-overlay" class="nc-locked-overlay"
/> />
</template> </template>

Loading…
Cancel
Save