Function getFilterSelection

The read side of withFilterSelection: the current selection of a filter as scalar values.

If the state has no such filter, the filter has no parameter, or the selection contains tuples of more than one value (use getFilterSelectionTuples for those).

  • Parameters

    • state: FilteredSearchState

      The filtered search state.

    • endpoint: string

      The endpoint of the filter or facet (for facets, the options endpoint).

    Returns (string | number)[]

    The selected values, or [] when nothing is selected.