ui icon indicating copy to clipboard operation
ui copied to clipboard

Select component placeholder

Open silverfoxcodew opened this issue 2 years ago • 2 comments

When you add any props on the <Select> component, the placeholder prop on the <SelectValue> component disappears in the UI.

silverfoxcodew avatar May 03 '23 01:05 silverfoxcodew

I'm assuming you are using the defaultValue prop, and In that case the placeholder only disappears when the default value is not one of the SelectItems. For example, If the select has items "apple" "banana" than the defaultValue should be defaultValue="banana" or apple.

If it's with any other prop, please provide additional detail on how it can be reproduced.

puneet-sarhali avatar May 03 '23 20:05 puneet-sarhali

Same with me, fix with delete the defaultValue of the select input, then the placeholder show it again! Thanks @Swapnanil-Gupta

caturbgs avatar Jun 03 '23 16:06 caturbgs

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Jul 04 '24 23:07 shadcn