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

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions