Replies: 2 comments
-
Right now there is no prop like that, so yes you'll need to add your own empty option. But this seems like a useful feature request, and we already support another special kind of option (the "create new item" option). I think there are two ways to approach this UI problem:
I'm curious to hear @CPerinet's thoughts on this... |
Beta Was this translation helpful? Give feedback.
-
I went ahead and added a prop in our Select2 wrapper that unshifts an empty object to the array. The clear button would be a nice feature, but I wanted to say that both features would be useful and one may not replace the other for some users. |
Beta Was this translation helpful? Give feedback.
-
I'm using Select2 as a select input replacement because we need ultimate control over the styling. What's the best way to show an empty option?
I assume I just need to add an empty option in my
items
array but was hoping for a prop.Beta Was this translation helpful? Give feedback.
All reactions