Replies: 1 comment 2 replies
-
Thanks for the discussion, I'm unfortunately having a hard time telling what's going on in that video. Would you be willing to make a codesandbox or stackblitz to demonstrate the behaviour? I was looking at https://react-spectrum.adobe.com/react-aria/examples/searchable-select.html and if I'm interpreting your question and demo correctly, the selected key's item does not need to be in the ListBox. Granted this isn't an async list. So I think a demo would be very helpful to make sure I'm understanding this correctly. Thank you! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For a serverside searchable + paginated Select component, does the object to which the current SelectedKey belongs, have to be in the ListBox's "items" prop?
If ListBox's "items" prop doesn't have the object to which the current SelectedKey belongs, it defaults to the placeholder. It seems like I'm forced to include the current object in the "items" prop at all times. (see attached video)
Is it possible to manage the selected state by using only ? I feel like it shouldn't matter if the currently selected ID's object isn't present in "items" if I'm managing the selected state myself in .
This becomes annoying because when no results are present, you still have the single item present, which isn't really what I want.
Here's a video of what I mean:
Screen.Recording.2025-08-30.at.9.50.18.PM.mov
Beta Was this translation helpful? Give feedback.
All reactions