Expand description
Core search input with a toolkit-owned native renderer: NSSearchField, UISearchTextField, GtkSearchEntry, a Qt search field, Android search input, XAML AutoSuggestBox, or DOM search input.
It is bound two-way to a Signal<String>, the same pattern as the core picker: a native
edit dispatches an Event::TextChanged back to Rust which sets the signal, and an external
signal change patches the control with SearchPatch::SetText. A per-build echo guard remembers
the last value that arrived from the native control so its own change is not written straight
back (which some toolkits would re-emit → a feedback loop). Like the core text_field it is a
width-growing leaf (grow_w = true, natural height): a search field fills its row.
ⓘ
let query = Signal::new(String::new());
search_field(query).placeholder(res::str::search_placeholder())Structs§
- Search
Field - A native search field bound two-way to
query. Set a prompt with.placeholder(_). - Search
Props - Full props (realize).
textseeds the control;placeholderis the empty-state prompt. Onlytextchanges after build (viaSearchPatch::SetText); the placeholder is fixed at build.
Enums§
- Search
Patch - The single imperative update: replace the control’s text (programmatic sync from the signal).
Constants§
Traits§
- Search
Field Builder - Builder methods of
SearchField, reachable through aDecorated(docs/api-style.md “Typed builders and erasure”): generic modifiers and typed ones chain in any order.
Functions§
- search_
field search_field(query): a native search input whose text mirrorsqueryin both directions;queryis aSignal<String>or any other two-way binding (a day-modelField).- support
- Whether the selected toolkit implements this control.