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

fix(MultiSelect.Filterable): onMenuChange is not being called #8752

Merged
merged 2 commits into from
May 25, 2021

Conversation

Matheus-Rangel
Copy link
Contributor

Closes #8749

Currently the function was relying on the inputBlur switch case to call the handleOnMenuChange, but that was not enough and most of the times when clicking outside the dropdown the onMenuChange prop was not being called.

Fixing the issue by Calling handleOnMenuChange function inside the handleOnOuterClick.

Changelog

Changed

  • Calling handleOnMenuChange function inside the handleOnOuterClick instead of modifying the state directly

Removed

  • The call of the handleOnMenuChange inside the inputBlue switch case to avoid duplicate false calls to the onMenuChange.

@Matheus-Rangel Matheus-Rangel requested a review from a team as a code owner May 24, 2021 20:18
@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2021

DCO Assistant Lite bot All contributors have signed the DCO.

@netlify
Copy link

netlify bot commented May 24, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 6f1b4b2

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/60ad65d7e77d550007341595

😎 Browse the preview: https://deploy-preview-8752--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented May 24, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 6f1b4b2

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/60ad65d79df0370008ab240a

😎 Browse the preview: https://deploy-preview-8752--carbon-components-react.netlify.app/iframe

@Matheus-Rangel
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for contributing a fix! 👍 ✅

@Matheus-Rangel Matheus-Rangel changed the title fix(MultiSelect.Filterable): onMenuChange was not being called fix(MultiSelect.Filterable): onMenuChange is not being called May 25, 2021
Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me

@kodiakhq kodiakhq bot merged commit c99e135 into carbon-design-system:main May 25, 2021
@jnm2377 jnm2377 mentioned this pull request May 26, 2021
22 tasks
emyarod pushed a commit to emyarod/carbon that referenced this pull request Jun 10, 2021
…n-design-system#8752)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiselect.Filterable onMenuChange is not being called when the menu closes by an outer click
4 participants