-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Ensure that combobox empty state is rendered when items arent directly provided to the combobox #8720
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: Ensure that combobox empty state is rendered when items arent directly provided to the combobox #8720
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. opted to add renderEmptyState in the reusable example, but that means there is a slight item height increase when typing in the async example and it renders the emptyState since that example doesn't use MyItem. If we are fine with that example getting the red hover style I can change that too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think it's fine personally |
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.
If the ComboBox either uses defaultItems or has its items defined by the wrapped ListBox, useComboBoxState will return a ListCollection instead of a BaseCollection, resulting in a different way of calculating collection size. The below change makes sure the loaders aren't included in the keymap which should be fine since they aren't focusable. Ideally, we'd always use a BaseCollection though