unify watchers
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2024-08-09 12:27:24 +02:00
parent bd05460b90
commit 02cfa54a40
1 changed files with 5 additions and 7 deletions

View File

@ -97,13 +97,11 @@ function setUserParams(watchedParams) {
} }
watch( watch(
() => route.query[$props.searchUrl], () => [route.query[$props.searchUrl], arrayData.store.userParams],
(val, oldValue) => (val || oldValue) && setUserParams(val) ([newSearchUrl, newUserParams], [oldSearchUrl, oldUserParams]) => {
); if (newSearchUrl || oldSearchUrl) setUserParams(newSearchUrl);
if (newUserParams || oldUserParams) setUserParams(newUserParams);
watch( }
() => arrayData.store.userParams,
(val, oldValue) => (val || oldValue) && setUserParams(val)
); );
watch( watch(