hoist-react
hoist-react copied to clipboard
`FilterChooser` support for AND vs. OR modes
With respect to how field-level clauses managed by filter chooser are constructed, the component and its backing model currently applies a kind of hybrid AND/OR approach, designed to cover the most common usage patterns:
- Filters across different fields are AND'd together
- Filters on a single field are OR'd together (imperfectly, see #3408)
We've had a client request for a more global OR mode, where you could gather results from mutually-exclusive filters across fields. As an example, imagine positions belong to strategies and strategies are grouped into portfolios. A user might wish to return all positions in StratA and StratB + all those in PortfolioC (where the two strategies do NOT belong to that portfolio).
We are assuming that we are not looking to have users manage parenthesis / nested boolean clauses - looking for an option that is still point-and-click but with some additional control over the generated logic.
Questions to consider:
- Given that the current behavior is not exactly ANDing clauses together, do we want to create some idea of a "mode", have the current behavior be "auto" mode, then add "strict and" + "or" modes?
- How should / would this interact with grid filters, if both a grid and filter chooser were bound to the same store?