Add clarification on default selected/expanded IDs#221
Add clarification on default selected/expanded IDs#221dgreene1 merged 1 commit intodgreene1:masterfrom
Conversation
|
Thanks @dospunk. @yhy-1 / @mellis481 if what our generous contributor wrote in this documentation PR is true, shouldn’t we use some kind of mutually exclusive typescript type so that both our consumers and our code clarifies that both props should not be sent? I say this because there are many comments per year that express confusion about these props. |
We inherited this repo after the separate props were implemented. |
Thanks for the history. But do you agree that a mutually exclusive interface would be helpful here? Or is this documentation update in this PR wrong? |
What is in the PR is correct. IIRC, other libraries (eg. Ant Design) do the same thing (different properties for default values and controlled values), but don't document it. I would not like to update the interface. I'm OK with merging this PR. |
Sounds good then. Thanks @dospunk for giving us an easily mergeable and great addition to the library. |
Adds clarification that
defaultSelectedIdsanddefaultExpandedIdsare only used ifselectedIdsandexpandedIdsare not provided (respectively).