diff --git a/tailbone/templates/grids/complete.mako b/tailbone/templates/grids/complete.mako index 940174dc..cb040cc4 100644 --- a/tailbone/templates/grids/complete.mako +++ b/tailbone/templates/grids/complete.mako @@ -294,6 +294,7 @@ computed: { addFilterChoices() { + // nb. this returns all choices available for "Add Filter" operation // collect all filters, which are *not* already shown let choices = [] @@ -354,6 +355,13 @@ methods: { + formatAddFilterItem(filtr) { + if (!filtr.key) { + filtr = this.filters[filtr] + } + return filtr.label || filtr.key + }, + % if grid.click_handlers: cellClick(row, column, rowIndex, columnIndex) { % for key in grid.click_handlers: diff --git a/tailbone/templates/grids/filters.mako b/tailbone/templates/grids/filters.mako index eb245934..cb6ec9e2 100644 --- a/tailbone/templates/grids/filters.mako +++ b/tailbone/templates/grids/filters.mako @@ -32,7 +32,7 @@ v-model="addFilterTerm" placeholder="Add Filter" field="key" - :custom-formatter="filtr => filtr.label" + :custom-formatter="formatAddFilterItem" open-on-focus keep-first icon-pack="fas"