Repository navigation
fix(query-builder): close the group menu on a second button click - #18025
Open
damyanpetev wants to merge 1 commit into
Open
damyanpetev wants to merge 1 commit into
damyanpetev wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the query-builder group-menu toggle fix.
No open issues 🎉
What changed in this PR
Fixes query-builder group menus reopening after a second click on their AND/OR button when noop animations are enabled.
Changes:
- Excludes the active group button from overlay outside-click handling, leaving toggling to the button’s handler.
- Adds a regression test verifying that clicking an open menu’s button closes it without reopening.
| File | Description |
|---|---|
| projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.spec.ts | Tests second-click closure and checks that no reopening occurs. |
| projects/igniteui-angular/query-builder/src/query-builder/query-builder-tree.component.ts | Excludes the menu’s trigger button from outside-click handling. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With noop animations (
provideNoopAnimations()), clicking a group's AND/OR button while its context menu is open closes the menu and immediately opens it again.The menu's overlay closes on outside clicks, and the button is outside the menu, so the overlay closes it first. A noop close finishes on the spot, so the button's own handler then finds the menu collapsed and reopens it. With real animations the close is still running at that point, and the handler closes the menu as intended.
The button is now excluded from the overlay's outside clicks, as the query builder already does for its selects, so only the button's handler opens or closes the menu.
🤖 Generated with Claude Code