feat(ViewFilters): View filter expansions
Related pulse
https://uncinc.monday.com/boards/99020894/pulses/4898878962
What does this MR do?
- Adds an option in the
ViewFilterQueryProvider
to determine the "source of truth" with regards to the filtering and pagination state: it can now be set using thestorageType
prop and can be set tomemory
orurl
(defaults tomemory
if not provided or an invalid value is provided) - Adds an option so that a
ViewFilterQueryProvider
is rendered withView
by adding awithProvider
prop to theView
(and optionally the props for the provider). - Removes a minor and redundant operation when determining new filters in the
setFilters
andsetQueryParams
callbacks.
Rationale
Sometimes you might want multiple views on a page, one of which is controlled by the URL query params and the other(s) are controlled by a React State. Previously, there was no analogous solution (that is, with a similar interface) to manage filtering and pagination using React state. Alternatively, you could even manage all views on a page using URL query params, given that the filter keys are unique (as well as the pagination key, which you can alter with the pageQueryParam
prop).
Additionally, the previous implementation did not provide an easy or idiomatic way to implement the provider in a project. With this MR, we bake the provider in the View
component, so little extra work needs to be done to activate this feature.
Checklist
-
Manual testing to check if breaking -
Automatic testing -
Run and fixed eslint