themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 396 forks source link

Support for placeholder in Dropdown #1260

Open victorfunes opened 5 months ago

victorfunes commented 5 months ago

Summary

Now the Dropdown has a placeholder property but it seems not being used. Does it make sense to enable it to be used when the label is not defined?

Maybe I am using it as a select incorrectly, but I don't like the style of the Select floating menu... If there is another way, any advise will be more than welcome.

Context

In case a dropdown label is initially not defined, it could show the placeholder. Now I am doing it from my components using:

<Dropdown label={label ?? placeholder} ...

SutuSebastian commented 5 months ago

This would be a good addition to the existing API layer of the component.