This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(Tree): control activeItemIds through expanded prop of items #2061
feat(Tree): control activeItemIds through expanded prop of items #2061
Changes from 21 commits
8ae5d5c
90e08e0
369a18a
632ac1f
27d6bef
084ff63
f0b7d8c
af2685d
78f1087
1cf0ba8
b35bc5d
09a9adf
4d8a16c
c2aa1e1
13608d5
b464fa2
6c3cf66
f28dbce
c978b34
93213ce
b7a822f
6b55208
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The items could be defined as render functions too, we should handle that case, or at least check whether it is an object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it won't work well with render functions. We are calculating some props that we pass to TreeItem from Tree in
getItemsForRender
. However we probably can support this scenario with render prop as well. We just call the children function with the props fromitemsForRender
so the child component has access to them as well.I would consider working on this in a separate PR. And just perform here the object check as per suggestion.
What do you think @mnajdova @jurokapsiar @miroslavstastny ?