Filter Drawer Controller
Et2FilterDrawerController
Overview
A filter drawer for a widget that has nowhere else to put its filters - a nextmatch in a popup, a history
log in an edit dialog. There is no egw-app filter drawer there, and no header to put a filter
button in, so the drawer slides over the widget itself and is opened from the “Filters” entry of the
datagrid’s column action.
The host renders render() somewhere in its shadow root, includes
filterDrawerStyles, gives itself position: relative (the drawer is
contained) and binds its datagrid:
<et2-datagrid .filterAction=${true}
.filterActive=${this._filterDrawer.isActive(this._filters)}
Used by
These widgets create and host this controller.
Properties
| Name | Description | Type | Default |
|---|---|---|---|
drawer |
The rendered sl-drawer, once the host has rendered it |
any
|
- |
toggle |
Bound, so it can be handed to an event binding as it is | - | - |
Methods
| Name | Description | Arguments |
|---|---|---|
blank()
|
The filters to apply to empty these ones: every filter named and set to ”″, every column filter too,
apart from the ignore ones. For a clear that hands this to its host’s
applyFilters(), rather than emptying the filterbox’s widgets and applying what the filterbox then
reports: a widget emptied that way can drop out of the filterbox’s value altogether instead of
reporting ”″ (a date range does), and applyFilters() only changes the filters it is given, so that
filter would stay applied. The filterbox’s widgets follow the applied filters, so they end up empty
too.
|
filters: Record<string, any> | null | undefined
|
isActive()
|
Are any of these filters set, apart from the ignore ones? |
filters: Record<string, any> | null | undefined
|