Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add condition to PropertyFilterBuilderRenderer to allow last rule deletion #1034

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

morganadrales
Copy link
Contributor

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.

Copy link
Member

@saskliutas saskliutas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@morganadrales
Copy link
Contributor Author

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

Copy link
Collaborator

@GerardasB GerardasB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, describe the change in NextVersion.md as well

@morganadrales morganadrales enabled auto-merge (squash) September 18, 2024 15:20
@morganadrales morganadrales merged commit 6d28327 into master Sep 18, 2024
18 of 20 checks passed
@morganadrales morganadrales deleted the morgan/filter-builder-allow-last-rule-delete branch September 18, 2024 19:53
@GerardasB GerardasB added the minor Changes in this PR requires creating a minor release label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Changes in this PR requires creating a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants