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

ColumnFilter: doesn't close filter menu on click outside or on scroll with ChangeDetectionStrategy.OnPush #13325

Closed
AlexWalkerson opened this issue Jul 12, 2023 · 4 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@AlexWalkerson
Copy link

Describe the bug

Table Filter p-columnfilter does not close after clicking outside of the "Filter Menu" or scrolling when the container component is defined by the OnPush strategy. hide() method is called and overlayVisible changes to false but this is not reflected in the view.

Environment

OS: Windows 10
Chrome Version 114.0.5735.199 (Official Build) (64-bit)
primeng: 14.2.3, 16.0.2
angular: 14.3.0, 16.1.4

Reproducer

https://stackblitz.com/edit/primeng-tablefilter-demo-cgdpzk?file=src%2Fapp%2Fapp.component.ts

Angular version

14.3.0, 16.1.4

PrimeNG version

14.2.3, 16.0.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.20.1

Browser(s)

Chrome Version 114.0.5735.199 (Official Build) (64-bit)

Steps to reproduce the behavior

  1. Create angular component with ChangeDetectionStrategy.OnPush;
  2. Implement p-table component with p-columnFilter;
  3. Click on the filter icon to open 'Filter Menu'
  4. Click outside the 'Filter Menu' OR scroll down;
  5. The "Filter Menu" remains open.

Expected behavior

The "Filter Menu" should be closed by a click from the outside or scroll. The behavior should not differ from ChangeDetectionStrategy.Default.

@AlexWalkerson AlexWalkerson added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 12, 2023
@Joroooo
Copy link

Joroooo commented Jan 29, 2024

i face the same issue
any updates?

@Joroooo
Copy link

Joroooo commented Jan 29, 2024

related to #10692
and provided solutions do not work

@hoeferbe
Copy link

I use angular 17.3 with primeng 17.11.0 and I can close ptable filter menu on click outside. with primeng 17.12 and also 17.13 it doesn't work anymore. (with default ChangeDetectionStrategy)

@AlexWalkerson
Copy link
Author

@hoeferbe thanks, I checked and tried to reproduce the bug with

"@angular/core": "^16.1.4", 
"primeng": "^17.11.0",

And the click outside closes the menu, therefore I close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants