Sorts the facets to match the order in the most recent search response.
An array of facet payloads to sort.
A sorted array.
Adds a callback that's invoked on state change.
A callback that's invoked on state change.
A function to remove the listener.
The
FacetManager
controller helps reorder facets to match the most recent search response.Example: facet-manager.fn.tsx