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

TreeTable: Multiple filters set at once only keeps the last applied #7469

Closed
SamirMokiem opened this issue Dec 2, 2024 · 0 comments · Fixed by #7486
Closed

TreeTable: Multiple filters set at once only keeps the last applied #7469

SamirMokiem opened this issue Dec 2, 2024 · 0 comments · Fixed by #7486
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@SamirMokiem
Copy link

Describe the bug

When applying multiple filters using the TreeTable ref at once, only the last filter is applied. I think this is an issue with the internal filter state.

const applyDoubleFilter = () => {
  ref.current.filter('applications', 'name', 'equals');
  ref.current.filter('100kb', 'size', 'equals'); // Only this one is applied
};

Reproducer

https://stackblitz.com/edit/h16dsr-1yzdy5

System Information

System:
    OS: Windows 11 10.0.22621
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
    Memory: 6.10 GB / 31.71 GB
  Binaries:
    Node: 20.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.54)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    primereact: 10.8.2 => 10.8.2
    react: 18.3.1 => 18.3.1

Steps to reproduce the behavior

  1. Create a new TreeTable component with 2 or more columns that can be filtered
  2. Create a single method that filters 2 or more columns at once on the TreeTable ref
  3. Call the method.

Expected behavior

All filters are applied.

@SamirMokiem SamirMokiem added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 2, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 2, 2024
@melloware melloware added this to the 10.8.6 milestone Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants