pub struct HyleFilterField<R = ()> {
pub key: String,
pub label: String,
pub field: Field,
pub options: Option<Vec<(String, String)>>,
pub display_field_type: Option<FieldType>,
pub render: Option<R>,
}Expand description
Metadata for a single filter input, pre-computed by a filters hook.
For Reference fields, options is pre-resolved from the outcome lookups
so the filter component does not need access to the outcome.
The R type parameter is a per-field render override supplied by framework
adapters (e.g. Rc<dyn Fn(Props) -> Element> in hyle-dioxus). It
defaults to () so callers that do not need per-field render overrides can
use HyleFilterField without a type argument.
Fields§
§key: String§label: String§field: Field§options: Option<Vec<(String, String)>>Pre-resolved (id, display_label) pairs for Reference fields.
display_field_type: Option<FieldType>The FieldType of the referenced entity’s display_field, when this
field is a Reference or Array<Reference>. Used by framework adapters
to look up a registered value/filter renderer for the display field.
render: Option<R>Optional per-field render override installed by the change map.