pnp / pnp/sp-dev-fx-controls-react
TreeView - dynamic adding children, nodes always expanded
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 433
- Forks
- 418
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 19
Description
Category
-
Enhancement
-
Bug
-
Question
Version
Please specify what version of the library you are using: [1.19.0 ]
If I'm using the onExpandCollapse prop to dynamically add ITreeItem children to a node when it's expanded, then each child ITreeItem is added in an "expanded" state, so to drill further down, you need to collapse then expand in order to correctly show children.
Is there any way to add an ITreeItem with an empty children array, such that the new child is a collapsed state so that the new child item can be expanded to further retrieve children dynamically.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the TreeView behavior in version 1.19.0 with the onExpandCollapse prop and dynamically added ITreeItem children. Inspect the TreeView implementation to determine how an empty children array sets expansion state; done means newly added child nodes remain collapsed while still allowing further dynamic expansion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100