Skip to content

[Bug]: Table ColumnFilter leaves stale ZIndexUtils entries on close #1356

Description

@EeneeS

Checklist

  • I have searched the existing issues and have not found a duplicate
  • I have read the README and documentation and have not found a solution
  • I agree to follow the OpenNG Foundation Code of Conduct

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

  1. Open column filter and verify z-index (assume z-index = x)
  2. Close column filter
  3. Open column filter and verify z-index = x + 2
  4. 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

- OS: Windows

Angular application setup

None

Angular context

  • SSR (Server-Side Rendering) is involved
  • Zoneless change detection is enabled

Relevant log output

Screenshots

No response

Additional context

No response

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: TableStatus: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possibleType: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions