Signature
Explore example code
Browse the Filter Map example code on GitHub.
About this widget
Components holding a map of filters, and that can apply a single filter at a time.Examples
Kotlin
Low-level API
If you want to fully control the Filter Map components and connect them manually, use the following components:Searcher. TheSearcherthat handles searches.FilterState. The current state of the filters.FilterMapViewModel. The logic applied to the filter map.FilterMapView. The view that renders the filter map.
Kotlin
Compose UI
InstantSearch provides theFilterMapState as a state model,
which is an implementation of the FilterMapView interface.
FilterMapState must be connected to the FilterMapConnector or FilterMapViewModel like any other FilterMapView implementation.
Kotlin
Parameters
Map<Int, Filter>
required
The map of filters to be held.
The key is an unique identifier for the filter value.
Kotlin
FilterState
required
The
FilterState that holds filters.Int?
default:"null"
The key of the filter selected by default.
FilterGroupID
default:"FilterGroupID(FilterOperator.And)"
Groups all created filters under an ID.
View
FilterMapView
required
The view that renders the filter map.
default:"FilterPresenterImpl()"
How to display filters.
Kotlin