bullhorn / novo-elements

UI Repository for Bullhorn's Novo Theme
http://bullhorn.github.io/novo-elements
MIT License
76 stars 61 forks source link

feat(QueryBuilder): adding new 'multiple scope' concept to criteria builder #1592

Closed dvoegelin closed 1 week ago

dvoegelin commented 3 weeks ago

Description

this introduces new functionality to the query builder component. now when you pass in a config with more than one set of fields, it will configure it as a 'multiple scoped' criteria builder. this updates the behavior to create scoped groups for each type of field, with a single tabbed group picker to select them.

note that the existing behavior is unchanged if you only have one set of fields in your config. see the demo for implementation examples.

we also ran across a situation where we would like to show the QueryBuilder's operator for the first row, so we decided to put this behind a flag so it can be user configurable. it's defaulted to the original behavior so it will only change if explicitly updated.

lastly we ran across a situation where we would like to be able to remove all rows from a criteria builder, so we decided to add a flag (canBeEmpty) to decide whether we can remove the final row, or keep it but just clear it out instead. previously the delete button was simply disabled if it was on the final row.

Verify that...

Bullhorn Internal Developers

Screenshots
github-actions[bot] commented 3 weeks ago

Visit the preview URL for this PR (updated for commit 09792df):

https://novo-elements--pr1592-show-operator-u2uzgzt0.web.app

(expires Wed, 11 Sep 2024 18:33:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f1783e19c2444272095017dd8ba433fff0ee3f61