fix: don't set defined values for search and page

This commit is contained in:
Dominik Pschenitschni 2021-12-11 14:51:39 +01:00
parent 76f4cca5fe
commit e6e8a98514
No known key found for this signature in database
GPG key ID: B257AC0149F43A77

View file

@ -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 })