Skip to content

Always call onChange when clear button is pressed. #666

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

Closed

Conversation

Huulivoide
Copy link
Contributor

Commit 683c268 broke this on multi
select mode. As result the internal state of the Typeahead component
was cleared and it appeared empty, but later refocusing the element,
would cause the previously selected options to show up again, as the
clearing had not been propagated to the parent component.

What issue does this pull request resolve?
V5.2.0 broke clearButton on multiple select mode.

What changes did you make?
Conditionally calling _handleChange in _handleClear in multiple mode.
Also added a test case.

Is there anything that requires more attention while reviewing?
Nope.

Commit 683c268 broke this on multi
select mode. As result the internal state of the Typeahead component
was cleared and it appeared empty, but later refocusing the element,
would cause the previously selected options to show up again, as the
clearing had not been propagated to the parent component.
@ericgio
Copy link
Owner

ericgio commented Oct 11, 2021

Fixed in v5.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants