Skip to content
Discussion options

You must be logged in to vote

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
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by segunadebayo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants