-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAC select complex selected value #6361
Conversation
## API Changes
unknown top level export { type: 'any' } |
@@ -243,7 +245,8 @@ function SelectValue<T extends object>(props: SelectValueProps<T>, ref: Forwarde | |||
values: { | |||
selectedItem: state.selectedItem?.value as T ?? null, | |||
selectedText: state.selectedItem?.textValue ?? null, | |||
isPlaceholder: !selectedItem | |||
isPlaceholder: !selectedItem, | |||
selectedChildren: rendered |
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.
I wonder if we need this now that we have support for accessing defaultChildren
from the render prop function (I added that for color picker)?
We can use defaultChildren :) |
Closes
As seen in the story I added, if you don't allow for selectedChildren, and you don't provide a render function, then you'll get the entire rendered item with no ability to access the children.
✅ Pull Request Checklist:
📝 Test Instructions:
Only the title should appear in the story, not the description for the selected item
🧢 Your Project: