Browse Source

Merge pull request #3493 from nocodb/fix/gui-v2-form-view-hide-field

fix(gui-v2): add reloadEventHook.trigger() to get the latest localColumn value
pull/3499/head
Raju Udava 2 years ago committed by GitHub
parent
commit
3d38f4317f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/nc-gui-v2/components/smartsheet/Form.vue
  2. 4
      packages/nc-gui-v2/composables/useViewColumns.ts

3
packages/nc-gui-v2/components/smartsheet/Form.vue

@ -202,7 +202,8 @@ function hideColumn(idx: number) {
},
idx,
)
;(localColumns.value[idx] as any).show = false
reloadEventHook.trigger()
$e('a:form-view:hide-columns')
}

4
packages/nc-gui-v2/composables/useViewColumns.ts

@ -127,8 +127,8 @@ export function useViewColumns(view: Ref<ViewType> | undefined, meta: ComputedRe
return column
})
await loadViewColumns()
reloadData?.()
return
}
if (isUIAllowed('fieldsSync')) {
@ -143,7 +143,7 @@ export function useViewColumns(view: Ref<ViewType> | undefined, meta: ComputedRe
return insertedField
}
}
await loadViewColumns()
reloadData?.()
}

Loading…
Cancel
Save