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

Table component filters object issue when used with column toggle #16711

Open
Joebeurg opened this issue Nov 7, 2024 · 0 comments
Open

Table component filters object issue when used with column toggle #16711

Joebeurg opened this issue Nov 7, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Joebeurg
Copy link

Joebeurg commented Nov 7, 2024

Describe the bug

The table component does not update the object list for the filters when using a column toggle feature with multiselect component.
When toggling a column or more to display in the table, it updates the table correctly, but when deselecting columns, the filters object in the table does not reflect the changes. The table only adds newly selected columns by pushing to the filters object, while removing a column by deselecting it using the multiselect component, the table's filters object still shows that column with its filter value and operator.

Attached are Stackbliz and a video demonstrating the issue.

Screencast.From.2024-11-07.21-37-55.webm

Environment

Ubuntu 24.10
PrimeNG 17.18.11
Angular 18.0.2 and 18.2.10
MS Edge/ Chrome 130

Reproducer

https://stackblitz.com/edit/r4vgzs-gzakbb?file=src%2Fapp%2Ftable-column-toggle-demo.html

Angular version

18.2.10

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.18.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

When selecting or deselecting columns from a multiselect component, the filters object of the table should be updated to reflect the displayed column in use.
The selected columns should be the only ones to be available in the filters object discarding the deselected/removed columns.
Also, when a column has an applied filter, when that column is deselected, the filters object should not include it and it should reset it.

@Joebeurg Joebeurg added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 7, 2024
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

1 participant