Add special "contains any of" verb for string-based grid filters

This commit is contained in:
Lance Edgar 2021-02-12 13:57:54 -06:00
parent 1420a33649
commit 89f0336af9
4 changed files with 73 additions and 3 deletions

View file

@ -80,6 +80,23 @@ const GridFilter = {
return true
},
multiValuedVerb() {
/* this returns true if the filter's current verb should expose a multi-value input */
// if filter has no "multi-value" verbs then we safely assume false
if (!this.filter.multiple_value_verbs) {
return false
}
// if filter *does* have multi-value verbs, see if "current" is one
if (this.filter.multiple_value_verbs.includes(this.filter.verb)) {
return true
}
// current verb is not multi-value
return false
},
focusValue: function() {
this.$refs.valueInput.focus()
// this.$refs.valueInput.select()