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

fix: add number type in value #6636

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

uniqueeest
Copy link

@uniqueeest uniqueeest commented Jun 27, 2024

Closes

βœ… 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:

🧒 Your Project:

@uniqueeest uniqueeest closed this Jun 27, 2024
@uniqueeest uniqueeest reopened this Jun 27, 2024
Copy link
Member

@yihuiliao yihuiliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Would you mind adding "./packages/@react-types/radio" to our tsconfig? Figured we might as well add it our TS Strictmode check if we're updating the types.

"./packages/@react-types/progress",
"./packages/@react-types/searchfield",

Also, would you be interested in handling the updates to support number in Checkbox/CheckboxGroup as well? It's okay if not. I'd be happy to get this in and follow-up later with the support for checkbox.

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update


to

if (state.selectedValue == null) {

because the selectedValue could be 0 which would trigger this to set the last focused value to null

it looks like we're ok in useRadio

@uniqueeest
Copy link
Author

@snowystinger @yihuiliao thx! Corrections are complete.

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

3 participants