Skip to content

Tree: Bad initialization of expanded keys when filter option is present #8408

@RolT

Description

@RolT

Describe the bug

The initial value given to expandedKeys gets overridden if a filter field is present, even if the filter value is empty.

In the reproducer, both trees use the same initial expandedKeys but the tree with the filter field is not initialized properly (all nodes are collapsed).

Image

Reproducer

https://stackblitz.com/edit/edubbxcg

System Information

primereact: 10.9.7

Steps to reproduce the behavior

No response

Expected behavior

Both trees should be the same upon first render.

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a defect related to a specific component.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions