We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.4.8
Hi,
I got a little issue with the Select (which is working great btw). The selectedKeys prop does not work when keys are numeric.
selectedKeys
No response
Here's how to reproduce it:
<Select selectedKeys={[1]}> <SelectItem key={1} value={1}> Num 1 </SelectItem> </Select>
I got the following warning: Select: Keys "1" passed to "selectedKeys" are not present in the collection.
Select: Keys "1" passed to "selectedKeys" are not present in the collection.
The SelectItem with a numeric key should be selected
macOS
Chrome
The text was updated successfully, but these errors were encountered:
ENG-1454 [BUG] - Select with numeric keys are not supported
Sorry, something went wrong.
Thanks for the issue!
To handle numeric keys correctly in SelectItem, you can structure the items like this:
const items = [ { id: 1, value: "Num 1" }, { id: 2, value: "Num 2" }, { id: 3, value: "Num 3" }, ]; <Select items={items}> {(item) => <SelectItem>{item.value}</SelectItem>} </Select>
However, a key is currently required, so this will be addressed in the following PR. #3883
key
Thanks for the quick fix !
ryo-manba
Successfully merging a pull request may close this issue.
NextUI Version
2.4.8
Describe the bug
Hi,
I got a little issue with the Select (which is working great btw).
The
selectedKeys
prop does not work when keys are numeric.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Here's how to reproduce it:
I got the following warning:
Select: Keys "1" passed to "selectedKeys" are not present in the collection.
Expected behavior
The SelectItem with a numeric key should be selected
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: