Filter#
- class lumen.filters.base.Filter(*, field, label, schema, shared, sync_with_url, table, value, name)#
Filter components supply the filter values used by Source components to query data. .
Parameters#
field required
type: str
default: ''
The field being filtered.
label
type: str
default: ''
A label for the Filter.
name
type: str
default: 'Filter'
String identifier for this object.
schema
type: dict
default: None
The JSON schema provided by the Source declaring informationabout the data to be filtered.
shared
type: bool
default: False
Whether the filter is shared across all layouts.
sync_with_url
type: bool
default: True
Whether to sync the filter state with the URL parameters.
table
type: str
default: None
The table being filtered. If None applies to all tables.
value
type: Any
default: None
The current filter value.
Methods#
- Filter.to_spec(context: Dict[str, Any] | None = None) Dict[str, Any] #
Exports the full specification to reconstruct this component.
- Return type:
Resolved and instantiated Component object