forked from vikunja/frontend
fix: restrict filter params in comparison
This commit is contained in:
parent
5bf288a066
commit
e29a19f218
|
@ -54,10 +54,19 @@ export default {
|
|||
hasFilters() {
|
||||
// this.value also contains the page parameter which we don't want to include in filters
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const {page, ...value} = this.value
|
||||
const {filter_by, filter_value, filter_comparator, filter_concat, s} = this.value
|
||||
const def = {...getDefaultParams()}
|
||||
|
||||
return JSON.stringify(value) !== JSON.stringify(def)
|
||||
const params = {filter_by, filter_value, filter_comparator, filter_concat, s}
|
||||
const defaultParams = {
|
||||
filter_by: def.filter_by,
|
||||
filter_value: def.filter_value,
|
||||
filter_comparator: def.filter_comparator,
|
||||
filter_concat: def.filter_concat,
|
||||
s: s ? def.s : undefined,
|
||||
}
|
||||
|
||||
return JSON.stringify(params) !== JSON.stringify(defaultParams)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -15,7 +15,6 @@ export default {
|
|||
const popup = ref(null)
|
||||
|
||||
const toggle = () => {
|
||||
console.log('toggle')
|
||||
open.value = !open.value
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue