iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
9 stars 2 forks source link

Add condition to PropertyFilterBuilderRenderer to allow last rule deletion #1034

Closed morganadrales closed 2 months ago

morganadrales commented 2 months ago

Changes

Added a prop called allowLastRuleDelete that will enable the deletion of the last remaining rule in a group.

Testing

Built and tested locally with the Pineapple groups/query-builder component.

morganadrales commented 2 months ago

Looks good. Can you add unit test for PropertyFilterBuilderActions.removeItem in FilterBuilderState.test.ts to test the new behavior?

Added and also fixed a test that was failing in FilterBuilderRule.test.tsx due to not expecting that allowLastRuleDelete prop to be passed in the removeRule function