SearchWidget
- class omni.kit.window.extensions.ext_components.SearchWidget(on_search_fn: Callable[[List[str]], None])
Bases:
SearchField
String field with a label overlay to type search string into.
- Parameters
on_search_fn (Callable[[str], None]) – Function called with the search string.
Methods
__init__
(on_search_fn)Initializes the search widget and sets up the search field with callback.
Clears all filters currently applied to the search.
Gets the current set of filters applied to the search.
toggle_filter
(filter_to_toggle)Toggles a filter on or off in the current search filters.
Attributes
- __init__(on_search_fn: Callable[[List[str]], None])
Initializes the search widget and sets up the search field with callback.
- clear_filters()
Clears all filters currently applied to the search.
- get_filters()
Gets the current set of filters applied to the search.
- Returns
The list of current filters.
- Return type
list
- toggle_filter(filter_to_toggle)
Toggles a filter on or off in the current search filters.
- Parameters
filter_to_toggle (str) – The filter to toggle.