Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Ensure non-clearable dropdowns are actually not clearable. #731

Merged
merged 7 commits into from
Jan 21, 2020

Conversation

shammamah-zz
Copy link
Contributor

Closes #673.

@shammamah-zz shammamah-zz changed the title Fix clearable bug for single-option dropdowns. Ensure non-clearable dropdowns are actually not clearable. Jan 13, 2020
@shammamah-zz shammamah-zz marked this pull request as ready for review January 13, 2020 22:14
@Marc-Andre-Rivet
Copy link
Contributor

Marc-Andre-Rivet commented Jan 21, 2020

@shammamah react-select supports clearable... I think you can just add the following instead to make it work 😀

                <ReactDropdown
                    clearable={this.props.clearable}

@shammamah-zz
Copy link
Contributor Author

@Marc-Andre-Rivet clearable is already passed to ReactDropdown:

{...omit(['setProps', 'value'], this.props)}
-- might be a bug on their end.

Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@shammamah-zz shammamah-zz merged commit a75f38e into dev Jan 21, 2020
@shammamah-zz shammamah-zz deleted the 673-clearable-dropdowns branch January 21, 2020 18:14
JHSaunders pushed a commit to JHSaunders/dash-core-components that referenced this pull request Mar 30, 2020
* Fix clearable bug for single-option dropdowns.

* Fix clearable bug for multi-option dropdowns.

* Update CHANGELOG.

* Return if selected option is nil and dropdown is not clearable.

* Use backspaceRemoves and deleteRemoves.

Co-authored-by: Marc-André Rivet <Marc-Andre-Rivet@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Dropdowns with clearable=False are still clearable
2 participants