Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

Dropdown clearable sets '' as empty value.

Open dominikdosoudil opened this issue 1 year ago • 0 comments

Dropdown sets '' as value when it's cleared using cross button. I think that much more sense would make null as it's meaning is literally empty value. Moreover '' makes even less sense if e.g. numbers are used as keys of other options.

https://github.com/Semantic-Org/Semantic-UI-React/blob/21cce97ec4b9e7d46615a18b18cc2cd7dce7a0a9/src/modules/Dropdown/Dropdown.js#L772

Using null as an empty value should also resolve https://github.com/Semantic-Org/Semantic-UI-React/issues/1748

dominikdosoudil avatar May 16 '24 07:05 dominikdosoudil