Skip to main content

FilterField

Function FilterField 

Source
pub fn FilterField(_: FilterFieldProps) -> Element
Expand description

A reactive filter input derived from HyleFiltersState.

Looks up the field definition in state.fields, reads the current value from state.form_data, and calls state.set_field on change.

Rendering priority:

  1. Per-field render function stored in the HyleFilterField (from use_filters change map)
  2. Matching entry in the HyleComponents context (registered via use_hyle_components)
  3. Built-in default based on field type:
    • Boolean<select> with Any / Yes / No
    • Reference<select> populated from pre-resolved options
    • Array<Reference><fieldset> with one checkbox per option
    • Everything else → <input type="text"> (or the input.kind hint from the blueprint)

§Props

  • state — the HyleFiltersState from use_filters
  • field_key — the field name to render

§Props

For details, see the props struct definition.