From ac8dab30c78efc7bca236e5344fcedc1bbd87493 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:06:51 +0100 Subject: [PATCH] fix(core): add immediate flag to prop watchers --- packages/core/src/composables/useWatchProps.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/core/src/composables/useWatchProps.ts b/packages/core/src/composables/useWatchProps.ts index 695dbffb..c9bcd049 100644 --- a/packages/core/src/composables/useWatchProps.ts +++ b/packages/core/src/composables/useWatchProps.ts @@ -160,6 +160,9 @@ export function useWatchProps( store.setMaxZoom(props.maxZoom) } }, + { + immediate: true, + }, ) }) } @@ -173,6 +176,7 @@ export function useWatchProps( store.setMinZoom(props.minZoom) } }, + { immediate: true }, ) }) } @@ -186,6 +190,9 @@ export function useWatchProps( store.setTranslateExtent(props.translateExtent) } }, + { + immediate: true, + }, ) }) } @@ -199,6 +206,9 @@ export function useWatchProps( store.setNodeExtent(props.nodeExtent) } }, + { + immediate: true, + }, ) }) } @@ -212,6 +222,9 @@ export function useWatchProps( store.applyDefault.value = props.applyDefault } }, + { + immediate: true, + }, ) }) } @@ -237,6 +250,7 @@ export function useWatchProps( store.autoConnect.value = props.autoConnect } }, + { immediate: true }, ) watch(