Browse Source

fix(gui): override cellClickHookInj in expanded form to avoid unexpected behaviour

Click event hook is only necessary in cell level and should be override in expanded form

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5194/head
Pranav C 2 years ago
parent
commit
e93e791402
  1. 4
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

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

@ -3,6 +3,7 @@ import type { TableType, ViewType } from 'nocodb-sdk'
import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk'
import type { Ref } from 'vue'
import {
CellClickHookInj,
FieldsInj,
IsFormInj,
IsKanbanInj,
@ -49,6 +50,9 @@ const meta = toRef(props, 'meta')
const router = useRouter()
// override cell click hook to avoid unexpected behavior at form fields
provide(CellClickHookInj, null)
const fields = computedInject(FieldsInj, (_fields) => {
if (props.useMetaFields) {
return (meta.value.columns ?? []).filter((col) => !isSystemColumn(col))

Loading…
Cancel
Save