Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Tree: Custom collapseIcon/expandIcon is not applied on children #5393

Description

@rajkeshwar

Describe the bug

Codesandbox Case (Bug Reports)
Please see the below stackblitz. I want to apply the custom collapseIcon/expandIcon on all the nodes. But it's getting applied only on root nodes. I also checked the documentation for https://primereact.org/tree/#api.TreeNode. There is no option to pass collapseIcon/expandIcon as well.

https://stackblitz.com/edit/react-txxsfp?file=src%2FApp.js

Current behavior
Applying collapseIcon/expandIcon is taking effect only on root level node.

Expected behavior
Applying collapseIcon/expandIcon should get applied on all the nodes.

Please tell us about your environment:
Demonstrated on stackblitz

Reproducer

https://stackblitz.com/edit/react-txxsfp?file=src%2FApp.js

PrimeReact version

^10.1.1

React version

18.x

Language

ALL

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome, Safari

Steps to reproduce the behavior

Please see stackblitz

Expected behavior

Applying collapseIcon/expandIcon should get applied on all the nodes.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions