Filter Selection View

Last Updated - Platform 19.0.0 - SDK 14.0.0

The FilterSelectionView is the main view of a FilterSelectionViewController to present the selectable filters.

filter selection view

The PoqFilterSelectionView (default) variation of this view:

Container.shared.views.filterSelectionView = {

To add custom filters you must customise:

  • the FilterSelectionViewDataSource and FilterViewDataMapper to present the custom filter view.
  • the FilterSelectionViewController to handle selection changes.

Data Source

The FilterSelectionViewDataSource for a PoqFilterSelectionView to present the filter views based on filter types.

Container.shared.dataSources.filterSelectionViewDataSource = {

View Data Mappers

At current view data is specific to PoqView implementations. This is likely to change in the future to allow more flexibility.

The FilterSelectionViewDataMapper to map from the FilterSelectionState to the FilterSelectionViewData to present.

Container.shared.mappers.filterSelectionViewDataMapper = {

The FilterViewDataMapper to map from a Filter to the FilterViewData to presents. This mapper:

  • Maps FilterListViewData from .list to present FilterListView (list filters).
  • Maps FilterPriceViewData from .price to present FilterPriceView (price filters).
  • Maps FilterToggleViewData from .toggle to present FilterToggleView (toggle filters).
Container.shared.mappers.filterViewDataMapper = {