diff --git a/src/wuttaweb/templates/base.mako b/src/wuttaweb/templates/base.mako
index c8557ca..a85bc2d 100644
--- a/src/wuttaweb/templates/base.mako
+++ b/src/wuttaweb/templates/base.mako
@@ -164,12 +164,9 @@
gap: 0.5rem;
}
- .wutta-filter .button.filter-toggle {
- justify-content: left;
- }
-
.wutta-filter .button.filter-toggle,
.wutta-filter .filter-verb {
+ justify-content: left;
min-width: 15rem;
}
diff --git a/src/wuttaweb/templates/wutta-components.mako b/src/wuttaweb/templates/wutta-components.mako
index 3145c1f..888944e 100644
--- a/src/wuttaweb/templates/wutta-components.mako
+++ b/src/wuttaweb/templates/wutta-components.mako
@@ -88,16 +88,26 @@
-
-
-
+ {{ verbLabel }}
+
+
+
{
+ let label = option.label.toLowerCase()
+ for (let term of terms) {
+ if (label.indexOf(term) < 0) {
+ return false
+ }
+ }
+ return true
+ })
+
+ return options
+ },
+ },
+
methods: {
focusValue() {
this.$refs.filterValue.focus()
},
+ formatVerb(option) {
+ return option.label || option.verb
+ },
+
+ verbChoiceInit(option) {
+ this.verbKnown = false
+ this.$nextTick(() => {
+ this.$refs.verbAutocomplete.focus()
+ })
+ },
+
+ verbChoiceSelect(option) {
+ this.filter.verb = option.verb
+ this.verbLabel = option.label
+ this.verbKnown = true
+ this.verbTerm = ''
+ this.focusValue()
+ },
+
valuedVerb() {
/* return true if the current verb should expose value input(s) */