Browse Source

fix(gui): reload form view meta on change

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3830/head
Pranav C 2 years ago
parent
commit
8a4ee9eec0
  1. 8
      packages/nc-gui/components/smartsheet/Form.vue
  2. 2
      packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

8
packages/nc-gui/components/smartsheet/Form.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import { RelationTypes, UITypes, getSystemColumns, isVirtualCol } from 'nocodb-sdk' import { RelationTypes, UITypes, getSystemColumns, isVirtualCol, ViewTypes } from 'nocodb-sdk'
import { import {
ActiveViewInj, ActiveViewInj,
IsFormInj, IsFormInj,
@ -375,6 +375,12 @@ onMounted(async () => {
await loadFormView() await loadFormView()
setFormData() setFormData()
}) })
watch(view, (nextView) => {
if(nextView?.type === ViewTypes.FORM) {
reloadEventHook.trigger()
}
})
</script> </script>
<template> <template>

2
packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

@ -79,7 +79,7 @@ function onEdit(targetKey: number, action: 'add' | 'remove' | string) {
</div> </div>
<div class="w-full min-h-[300px] flex-auto"> <div class="w-full min-h-[300px] flex-auto">
<NuxtPage :pageKey="$route.params.type" /> <NuxtPage :page-key="$route.params.type" />
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save