diff --git a/packages/nc-gui-v2/components/smartsheet/Form.vue b/packages/nc-gui-v2/components/smartsheet/Form.vue index bfa1f37cb3..7d0a445cdf 100644 --- a/packages/nc-gui-v2/components/smartsheet/Form.vue +++ b/packages/nc-gui-v2/components/smartsheet/Form.vue @@ -3,7 +3,7 @@ import Draggable from 'vuedraggable' import { RelationTypes, UITypes, getSystemColumns, isVirtualCol } from 'nocodb-sdk' import { useToast } from 'vue-toastification' import type { Permission } from '~/composables/useUIPermission/rolePermissions' -import { computed, inject, useDebounceFn } from '#imports' +import { computed, inject, onClickOutside, useDebounceFn } from '#imports' import { ActiveViewInj, FieldsInj, IsFormInj, MetaInj } from '~/context' import { extractSdkResponseErrorMsg } from '~/utils' import MdiPlusIcon from '~icons/mdi/plus' @@ -68,6 +68,8 @@ const hiddenColumns = ref>([]) const availableColumns = inject(FieldsInj, ref([])) +const rowRef = ref() + const systemFieldsIds = ref>([]) const showColumnDropdown = ref(false) @@ -250,6 +252,10 @@ const updateColMeta = useDebounceFn(async (col: Record) => { } }, 250) +onClickOutside(rowRef, () => { + activeRow.value = '' +}) + onMounted(async () => { await loadFormView() setFormData() @@ -297,12 +303,11 @@ watch( - +