MiddlewareLast Updated - Platform 18.1.0 - SDK 13.0.0
Middleware handle interaction across features or services.
.withDelegateMiddleware(using: store.dispatch).withDelegateMiddleware(.applySelection(dispatchToPrevious: store.dispatch))
Middleware to delegate (pass back) the new
Filter selection to the previous feature. This delegate middleware pattern is used by all selection features.
This middleware must be added to the builder when building this feature.
Handles the following actions:
FilterSelectionStateAction.applySelection: This action dispatches a
state.selected to the dispatch function injected into the builder (usually the previous feature's
store.dispatch). The dispatch function acts as a delegate so this means the apply action and data is sent to the previous feature.
Middleware to handle navigation actions.
Handles the following
FilterSelectionNavigationDestination.filterOptionSelection: Builds and presents the
SelectionViewController using the
SelectionBuilder to present selection of
FilterOption items. Uses delegate middleware to map the resulting apply selection into a
Currently the Filter Option Selection feature is built by this middleware. To customise it you must also customise this middleware and override this action.