Clear icon does not go away after clearing when using resetValue
#2338
Labels
issue/bug-confirmed
Issues about a bug that has been confirmed by a maintainer
resetValue
#2338
Repro: https://plnkr.co/edit/1xmeaW9ni5e9Fiu1oNEn?p=preview
Note in the repro how the clear icon is present from the beginning (even though it starts out at the default value). After selecting another option and then clearing, the clear icon is still present. Clicking the clear icon when already at the default has no effect, as you might expect.
Digging into the code, it looks like it just checks for whether the value is non-null (for a single select) when deciding whether to render the clear icon. It should probably check whether the value is equivalent to the resetValue.
The text was updated successfully, but these errors were encountered: