Empty component not available in Select component. it's available in Combobox component. need Empty component in Select #3637
-
Empty component not available in the Select component. it's available in Combobox component. Need Empty component in Select |
Beta Was this translation helpful? Give feedback.
Answered by
segunadebayo
Sep 25, 2025
Replies: 1 comment
-
A combobox is a filterable element, which is why it has an Empty component. For Select, you can make one yourself const SelectEmpty = (props: React.ComponentProps<'div'>) => {
const select = useSelectContext()
if (select.collection.size === 0) {
return <div {...props} role="presentation" />
}
return null
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
segunadebayo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A combobox is a filterable element, which is why it has an Empty component.
For Select, you can make one yourself