Skip to content

fix(query-builder): close the group menu on a second button click - #18025

Open
damyanpetev wants to merge 1 commit into
masterfrom
dpetev/query-builder-group-menu-close
Open

damyanpetev wants to merge 1 commit into
masterfrom
dpetev/query-builder-group-menu-close

Conversation

@damyanpetev

Copy link
Copy Markdown
Member

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants