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

Tree: filterValue doesen't work #7499

Closed
ErDanieh opened this issue Dec 13, 2024 · 1 comment · Fixed by #7551
Closed

Tree: filterValue doesen't work #7499

ErDanieh opened this issue Dec 13, 2024 · 1 comment · Fixed by #7551
Assignees
Labels
Component: Documentation Issue or pull request is related to Documentation Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior
Milestone

Comments

@ErDanieh
Copy link

ErDanieh commented Dec 13, 2024

Describe the bug

The filter value doesen't work when you try to change it by props

Reproduce:
Change the prop filtervalue in any tree component and the node are not going to filter

Reproducer

No response

System Information

"primereact": "10.8.4",
"react": "18.3.1",

Steps to reproduce the behavior

No response

Expected behavior

No response

@ErDanieh ErDanieh 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 13, 2024
@melloware
Copy link
Member

@ErDanieh you are trying to use it in "Controlled Mode" which means when using filterValue you must handle state yourself with onFilterChange.

See my working example: https://stackblitz.com/edit/yfgagxuq?file=src%2FApp.jsx

@melloware melloware added Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 2, 2025
@melloware melloware self-assigned this Jan 2, 2025
@melloware melloware added this to the 10.9.2 milestone Jan 2, 2025
melloware added a commit to melloware/primereact that referenced this issue Jan 2, 2025
@melloware melloware added the Component: Documentation Issue or pull request is related to Documentation label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants