forked from vikunja/frontend
chore: make this.value a computed property again
This commit is contained in:
parent
0d752c9d32
commit
dc02c09f19
|
@ -10,7 +10,6 @@
|
|||
:class="{'is-open': visibleInternal}"
|
||||
class="filter-popup"
|
||||
v-model="value"
|
||||
@change="update"
|
||||
ref="filters"
|
||||
/>
|
||||
</template>
|
||||
|
@ -38,10 +37,17 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
visibleInternal: false,
|
||||
value: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
value: {
|
||||
get() {
|
||||
return this.modelValue
|
||||
},
|
||||
set(value) {
|
||||
this.$emit('update:modelValue', value)
|
||||
},
|
||||
},
|
||||
hasFilters() {
|
||||
// this.value also contains the page parameter which we don't want to include in filters
|
||||
const {sort_by, order_by, filter_by, filter_value, filter_comparator, filter_concat, s} = this.value
|
||||
|
@ -72,9 +78,6 @@ export default {
|
|||
},
|
||||
immediate: true,
|
||||
},
|
||||
value() {
|
||||
this.update()
|
||||
},
|
||||
visible() {
|
||||
this.visibleInternal = !this.visibleInternal
|
||||
},
|
||||
|
@ -92,9 +95,6 @@ export default {
|
|||
clearFilters() {
|
||||
this.value = {...defaultParams()}
|
||||
},
|
||||
update() {
|
||||
this.$emit('update:modelValue', this.value)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue