mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 16:37:06 +00:00
Nc fix(nc-gui): Bug fixes (#7979)
* fix(nc-gui): hide form field label if field title & label is same * fix(nc-gui): text area truncate issue in form prefilled readonly * fix(nc-gui): reset form state if user hide the select type prefilled option from limit options * fix(nc-gui): in form view on click sidebar form field make active edit field * fix(nc-gui): rating icon update issue in edit column modal
This commit is contained in:
@@ -36,9 +36,13 @@ const rowHeight = inject(RowHeightInj, ref(1 as const))
|
||||
|
||||
const isForm = inject(IsFormInj, ref(false))
|
||||
|
||||
const readOnly = inject(ReadonlyInj, ref(false))
|
||||
|
||||
const { showNull } = useGlobal()
|
||||
|
||||
const vModel = useVModel(props, 'modelValue', emits)
|
||||
const vModel = useVModel(props, 'modelValue', emits, {
|
||||
shouldEmit: () => !readOnly.value,
|
||||
})
|
||||
|
||||
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
|
||||
|
||||
@@ -77,8 +81,6 @@ const inputWrapperRef = ref<HTMLElement | null>(null)
|
||||
|
||||
const inputRef = ref<HTMLTextAreaElement | null>(null)
|
||||
|
||||
const readOnly = inject(ReadonlyInj)
|
||||
|
||||
watch(isVisible, () => {
|
||||
if (isVisible.value) {
|
||||
setTimeout(() => {
|
||||
@@ -211,8 +213,22 @@ watch(inputWrapperRef, () => {
|
||||
}"
|
||||
>
|
||||
<div v-if="isForm && isRichMode" class="w-full">
|
||||
<div class="w-full relative pt-11 w-full px-0 pb-1">
|
||||
<LazyCellRichText v-model:value="vModel" class="border-t-1 border-gray-100 !max-h-50" :autofocus="false" show-menu />
|
||||
<div
|
||||
class="w-full relative w-full px-0 pb-1"
|
||||
:class="{
|
||||
'pt-11': !readOnly,
|
||||
}"
|
||||
>
|
||||
<LazyCellRichText
|
||||
v-model:value="vModel"
|
||||
class="!max-h-50"
|
||||
:class="{
|
||||
'border-t-1 border-gray-100': !readOnly,
|
||||
}"
|
||||
:autofocus="false"
|
||||
show-menu
|
||||
:read-only="readOnly"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -233,7 +249,7 @@ watch(inputWrapperRef, () => {
|
||||
<LazyCellRichText v-model:value="vModel" sync-value-change read-only />
|
||||
</div>
|
||||
<textarea
|
||||
v-else-if="editEnabled && !isVisible"
|
||||
v-else-if="(editEnabled && !isVisible) || isForm"
|
||||
:ref="focus"
|
||||
v-model="vModel"
|
||||
:rows="isForm ? 5 : 4"
|
||||
|
||||
Reference in New Issue
Block a user