Checklist
What happened?
Table’s ColumnFilter does not properly clear its overlay from ZIndexUtils when the menu closes. In onOverlayAnimationAfterLeave, ZIndexUtils.clear(this.overlay) is called after this.onOverlayHide(). However, onOverlayHide() sets this.overlay to null, so ZIndexUtils.clear() is invoked with null instead of the actual overlay element.
As a result, the old z-index entry remains registered in ZIndexUtils. On subsequent open/close cycles, new entries are added while the stale ones are never removed, so the overlay’s assigned z-index keeps incrementing.
Steps to reproduce
- Open column filter and verify z-index (assume z-index = x)
- Close column filter
- Open column filter and verify z-index = x + 2
- Repeat step 2-3 and verify z-index keeps incrementing.
Expected behavior
When the ColumnFilter overlay closes, its z-index entry should be removed from ZIndexUtils, so reopening the menu does not accumulate stale entries or keep increasing the assigned z-index.
Actual behavior
the old z-index entry remains registered in ZIndexUtils. On subsequent open/close cycles, new entries are added while the stale ones are never removed, so the overlay’s assigned z-index keeps incrementing.
Minimal reproduction
Can be reproduced in the showcase app.
Stackblitz migrated from primeNG repo (still uses v21):
https://stackblitz.com/edit/stackblitz-starters-pztpy6q6?file=src%2Fapp%2Fapp.component.ts
Library version
v21
Angular version
21.0.6
Node version
22.22.0
Package manager
pnpm
Browser(s)
Chrome
Environment details
Angular application setup
None
Angular context
Relevant log output
Screenshots
No response
Additional context
No response
Checklist
What happened?
Table’s ColumnFilter does not properly clear its overlay from ZIndexUtils when the menu closes. In onOverlayAnimationAfterLeave, ZIndexUtils.clear(this.overlay) is called after this.onOverlayHide(). However, onOverlayHide() sets this.overlay to null, so ZIndexUtils.clear() is invoked with null instead of the actual overlay element.
As a result, the old z-index entry remains registered in ZIndexUtils. On subsequent open/close cycles, new entries are added while the stale ones are never removed, so the overlay’s assigned z-index keeps incrementing.
Steps to reproduce
Expected behavior
When the ColumnFilter overlay closes, its z-index entry should be removed from ZIndexUtils, so reopening the menu does not accumulate stale entries or keep increasing the assigned z-index.
Actual behavior
the old z-index entry remains registered in ZIndexUtils. On subsequent open/close cycles, new entries are added while the stale ones are never removed, so the overlay’s assigned z-index keeps incrementing.
Minimal reproduction
Can be reproduced in the showcase app.
Stackblitz migrated from primeNG repo (still uses v21):
https://stackblitz.com/edit/stackblitz-starters-pztpy6q6?file=src%2Fapp%2Fapp.component.ts
Library version
v21
Angular version
21.0.6
Node version
22.22.0
Package manager
pnpm
Browser(s)
Chrome
Environment details
- OS: WindowsAngular application setup
None
Angular context
Relevant log output
Screenshots
No response
Additional context
No response