Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

snowystinger
Copy link
Member

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:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Only the title should appear in the story, not the description for the selected item

🧢 Your Project:

@snowystinger snowystinger changed the title Rac select complex selected value RAC select complex selected value May 10, 2024
@rspbot
Copy link

rspbot commented May 10, 2024

@rspbot
Copy link

rspbot commented May 13, 2024

@rspbot
Copy link

rspbot commented May 13, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
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
Copy link
Member

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)?

@snowystinger
Copy link
Member Author

We can use defaultChildren :)

@snowystinger snowystinger deleted the rac-select-complex-selected-value branch May 14, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants