Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear icon does not go away after clearing when using resetValue #2338

Closed
smrq opened this issue Jan 30, 2018 · 1 comment
Closed

Clear icon does not go away after clearing when using resetValue #2338

smrq opened this issue Jan 30, 2018 · 1 comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer

Comments

@smrq
Copy link

smrq commented Jan 30, 2018

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.

@jossmac jossmac added issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer v1 labels Jul 6, 2018
@flexdinesh
Copy link
Collaborator

Hey @smrq v1 of react-select is no longer maintained.

We recommend maintaining your own v1 fork if you want to address v1 issues. We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest versions.

We highly recommend upgrading from v1 to v2. Chances are this issue might already be fixed or non-existent in v2.

I'm closing this issue/PR now. Feel free add your thoughts in #3981 and reference this issue/PR if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants