Fix grid filter bug when switching from 'equal' to 'between' verbs

and vice versa
This commit is contained in:
Lance Edgar 2023-06-16 12:21:51 -05:00
parent c2227b306b
commit c1f72e0d11

View file

@ -28,6 +28,17 @@ const GridFilterNumericValue = {
this.startValue = this.value this.startValue = this.value
} }
}, },
watch: {
// when changing from e.g. 'equal' to 'between' filter verbs,
// must proclaim new filter value, to reflect (lack of) range
wantsRange(val) {
if (val) {
this.$emit('input', this.startValue + '|' + this.endValue)
} else {
this.$emit('input', this.startValue)
}
},
},
methods: { methods: {
focus() { focus() {
this.$refs.startValue.focus() this.$refs.startValue.focus()