mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 08:09:02 +01:00
Pass options on if sent from server
This commit is contained in:
parent
85cef367e2
commit
f7e1dedac9
@ -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`
|
||||
|
Loading…
Reference in New Issue
Block a user