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

Dropdown in Table Filter Menu Fails to Apply Filter When appendTo="body" Is Used #15233

Closed
tosdan-projects opened this issue Apr 8, 2024 · 1 comment · Fixed by #15280 or #15300
Closed
Assignees
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions PRO Support Issue was reported by PRO User Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@tosdan-projects
Copy link

Describe the bug

I'm encountering an issue with a Table component that utilizes filters in the form of a Menu (display="menu"). One of the filters employs a custom template with a p-dropdown component. The issue arises when I add appendTo="body" to the p-dropdown configuration, resulting in the filter ceasing to function properly. Specifically, the dropdown menu can be opened, but selecting an item merely closes the dropdown without applying the selected filter.

To illustrate this issue, I've prepared an example by forking the PrimeNG documentation and simplifying it for clarity. Attached below is a video recorded based on this example, demonstrating the expected behavior (when appendTo=body is not applied, the filter functions correctly) versus the problematic behavior observed when appendTo=body is applied.

https://stackblitz.com/edit/zkbrkx?file=src%2Fapp%2Fdemo%2Ftable-filter-menu-demo.html

2024-04-08_18-59-50_PrimeNG_TableFilterMenuDemo_-_StackBlitz_-_Google_Chrome.mp4

Environment

Windows 10
Node 20.11
Typescript 5.3.3
Angular 17.3

Reproducer

https://stackblitz.com/edit/zkbrkx?file=src%2Fapp%2Fdemo%2Ftable-filter-menu-demo.html

Angular version

17.3.1

PrimeNG version

17.12.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

Chrome 123

Steps to reproduce the behavior

  1. Fork the example provided in PrimeNG docs for Table with Filter Menu https://primeng.org/table#filter-menu
  2. In the template for the column Status, add the property appendTo="body" to the p-dropdown component
  3. in the preview window click on the status filter button select any value from list of values for the filter

Expected behavior

No response

@tosdan-projects tosdan-projects added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 8, 2024
@cetincakiroglu cetincakiroglu added this to the 17.14.0 milestone Apr 10, 2024
@nickshoe
Copy link

+1

@cetincakiroglu cetincakiroglu added the PRO Support Issue was reported by PRO User label Apr 15, 2024
mehmetcetin01140 added a commit that referenced this issue Apr 16, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE Issue's fix will be ported to supported LTS versions and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 18, 2024
cetincakiroglu added a commit that referenced this issue Apr 18, 2024
Fixed #15233 - Dropdown | Dropdown in Table Filter Menu Fails to Appl…
cetincakiroglu added a commit that referenced this issue Apr 18, 2024
Revert "Fixed #15233 - Dropdown | Dropdown in Table Filter Menu Fails to Appl…"
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 18, 2024
@cetincakiroglu cetincakiroglu removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 18, 2024
cetincakiroglu added a commit that referenced this issue Apr 18, 2024
Fixed #15233 | Refactor condition for outsideClick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions PRO Support Issue was reported by PRO User Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
4 participants