diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 8adf25508..4fd511631 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -97,13 +97,11 @@ function setUserParams(watchedParams) { } watch( - () => route.query[$props.searchUrl], - (val, oldValue) => (val || oldValue) && setUserParams(val) -); - -watch( - () => arrayData.store.userParams, - (val, oldValue) => (val || oldValue) && setUserParams(val) + () => [route.query[$props.searchUrl], arrayData.store.userParams], + ([newSearchUrl, newUserParams], [oldSearchUrl, oldUserParams]) => { + if (newSearchUrl || oldSearchUrl) setUserParams(newSearchUrl); + if (newUserParams || oldUserParams) setUserParams(newUserParams); + } ); watch(