diff --git a/api/js/etemplate/Et2Nextmatch/Headers/CustomFilterHeader.ts b/api/js/etemplate/Et2Nextmatch/Headers/CustomFilterHeader.ts index 701fe8fe7c..4868261612 100644 --- a/api/js/etemplate/Et2Nextmatch/Headers/CustomFilterHeader.ts +++ b/api/js/etemplate/Et2Nextmatch/Headers/CustomFilterHeader.ts @@ -3,6 +3,7 @@ import {Et2Select} from "../../Et2Select/Et2Select"; import {Et2InputWidget, Et2InputWidgetInterface} from "../../Et2InputWidget/Et2InputWidget"; import {FilterMixin} from "./FilterMixin"; import {html, LitElement} from "lit"; +import {cleanSelectOptions} from "../../Et2Select/FindSelectOptions"; /** * Filter by some other type of widget @@ -84,6 +85,20 @@ export class Et2CustomFilterHeader extends FilterMixin(Et2InputWidget(LitElement } } + /** + * New filter options from server + * @param new_options + */ + set_select_options(new_options) + { + const widget_class = window.customElements.get(this.filter_node?.localName); + const property = widget_class.getPropertyOptions('select_options'); + if(this.filter_node && property) + { + this.filter_node.select_options = cleanSelectOptions(new_options); + } + } + render() { return html`