react-component / select

React Select
https://select.react-component.now.sh/
MIT License
894 stars 453 forks source link

Showing 0 instead of empty string in OptionsList #894

Open inoyakaigor opened 1 year ago

inoyakaigor commented 1 year ago

In cases while Select had an Option with label '' (empty string) and value 0 the Select renders the 0 image

This hapens because of the code: https://github.com/react-component/select/blob/824383d6f45b2de5cb432437ce8bd9d0704c6a6f/src/OptionList.tsx#L339-L341

For context: we had moved from our own ui-kit to Antd and in our ui-kit using the empty string was neccessary for resetting the select option