Browse Source

fix(gui): reload meta and data on gallery view change

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3830/head
Pranav C 2 years ago
parent
commit
99b4ee654e
  1. 10
      packages/nc-gui/components/smartsheet/Gallery.vue

10
packages/nc-gui/components/smartsheet/Gallery.vue

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { isVirtualCol } from 'nocodb-sdk'
import { isVirtualCol, ViewTypes } from 'nocodb-sdk'
import {
ActiveViewInj,
ChangePageInj,
@ -159,6 +159,14 @@ onMounted(async () => {
// provide view data reload hook as fallback to row data reload
provide(ReloadRowDataHookInj, reloadViewDataHook)
watch(view, (nextView) => {
if (nextView?.type === ViewTypes.FORM) {
reloadEventHook.trigger()
}
})
</script>
<template>

Loading…
Cancel
Save