From 6ffa79c805624e73b9c2fdffb297c79f1675bd8b Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 14 Oct 2022 12:09:18 +0200 Subject: [PATCH] chore(nc-gui): separately watch tables and config --- packages/nc-gui/components/erd/Flow.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/erd/Flow.vue b/packages/nc-gui/components/erd/Flow.vue index a0769282fd..81df26e0f5 100644 --- a/packages/nc-gui/components/erd/Flow.vue +++ b/packages/nc-gui/components/erd/Flow.vue @@ -15,7 +15,7 @@ const props = defineProps() const { tables, config } = toRefs(props) -const { $destroy, fitView, onPaneReady } = useVueFlow({ minZoom: 0.1, maxZoom: 2 }) +const { $destroy, fitView, onPaneReady } = useVueFlow({ minZoom: 0.15, maxZoom: 2 }) const { layout, elements } = useErdElements(tables, config) @@ -28,7 +28,8 @@ function init() { onPaneReady(init) -watch([() => tables, () => config], init, { flush: 'post' }) +watch(tables, init, { flush: 'post' }) +watch(config, init, { flush: 'post', deep: true }) onScopeDispose($destroy)