-
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
Fix Combobox hidden input default value causing React warnings (name prop) #6336
Conversation
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.
Probably easier to address the ts strict separately, I suspect it'll be non-trivial. But if it's easy, then feel free to add it.
Would you mind adding a name to a combobox test? It'll log the warning and we fail the tests if any logs are in our output.
I agree. I'll take a look later if I have some down times 😄
This is cool! I verified the React warnings result in test failures when the name prop was added and the fix was removed. And yes I added |
may I help in any way to proceed with the merge of this pr? |
@lorenzo-dallamuta shouldn't need anything, looks like we just didn't finish the review. |
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.
LGTM, verified the warning happening before no longer happens
Closes #6327
It just occurred to me that it might also be nice to update the type for
selectedKey
fromKey
toKey | null
.Should I include that as well? Or maybe it's better to address it when converting
packages/@react-stately/list
to TS strict later (I don't see it on thetypescript-strict-plugin
list intsconfig.json
).react-spectrum/packages/@react-stately/list/src/useSingleSelectListState.ts
Lines 25 to 34 in cf0846e
✅ Pull Request Checklist:
📝 Test Instructions:
Story
🧢 Your Project: