fix: don't set defined values for search and page
This commit is contained in:
parent
76f4cca5fe
commit
e6e8a98514
1 changed files with 7 additions and 12 deletions
|
@ -13,15 +13,6 @@ export const getDefaultParams = () => ({
|
|||
filter_concat: 'and',
|
||||
})
|
||||
|
||||
|
||||
const filters = {
|
||||
done: {
|
||||
value: false,
|
||||
comparator: 'equals',
|
||||
concat: 'and',
|
||||
},
|
||||
}
|
||||
|
||||
const SORT_BY_DEFAULT = {
|
||||
id: 'desc',
|
||||
}
|
||||
|
@ -88,9 +79,13 @@ export function useTaskList(listId) {
|
|||
|
||||
const route = useRoute()
|
||||
watch(() => route.query, (query) => {
|
||||
const { page: pageQuery, search: searchQuery } = query
|
||||
const { page: pageQueryValue, search: searchQuery } = query
|
||||
if (searchQuery !== undefined) {
|
||||
search.value = searchQuery
|
||||
page.value = pageQuery
|
||||
}
|
||||
if (pageQueryValue !== undefined) {
|
||||
page.value = parseInt(pageQueryValue)
|
||||
}
|
||||
|
||||
}, { immediate: true })
|
||||
|
||||
|
|
Loading…
Reference in a new issue