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

[Bug]: FilterableMultiSelect onMenuChange not called on click outside menu #16896

Closed
2 tasks done
gi opened this issue Jun 28, 2024 · 3 comments · Fixed by #17136
Closed
2 tasks done

[Bug]: FilterableMultiSelect onMenuChange not called on click outside menu #16896

gi opened this issue Jun 28, 2024 · 3 comments · Fixed by #17136

Comments

@gi
Copy link
Contributor

gi commented Jun 28, 2024

Package

@carbon/react

Browser

Chrome

Package version

1.57.0

React version

v16.14.0

Description

When clicking outside the menu when opened, the onMenuChange callback is not fired with the next opened state.

The change came between
de133bea
and
5f35edd6
when FilterableMultiSelect.js was renamed to FilterableMultiSelect.tsx.

The Downshift component had an onOuterClick prop set to handleOnOuterClick which called handleOnMenuChange.

Reproduction/example

https://stackblitz.com/edit/github-wivrwb?file=src%2FApp.jsx&preset=node=

Steps to reproduce

  1. use onMenuChange prop on FilterableMultiSelect component
  2. open dropdown
  3. click outside menu to close
  4. onMenuChange callback is not called

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@Gururajj77
Copy link
Contributor

Gururajj77 commented Jul 4, 2024

Hi @gi , could you please let us know the steps to reproduce this issue, by making a stackblitz example so that we can work on this issue better and resolve it.

Please use sandboxes from this carbon sandbox repo, they are already customized with carbon library

@gi
Copy link
Contributor Author

gi commented Jul 4, 2024

@Gururajj77 I created one: https://stackblitz.com/edit/github-wivrwb?file=src%2FApp.jsx.

@ferdelamad
Copy link

Hey @Gururajj77 I'm facing the same issue, any idea when this will be fixed? Is currently blocking us from upgrading Carbon due to this bug.

Thanks!

@sstrubberg sstrubberg moved this to 🕵️‍♀️ Triage in Design System Jul 23, 2024
@Gururajj77 Gururajj77 moved this from 🕵️‍♀️ Triage to ⏱ Backlog in Design System Jul 25, 2024
gi added a commit to gi/carbon-ui that referenced this issue Aug 9, 2024
This fixes an issue where a mouse click event outside of the menu
does not call the `onMenuChange` callback when the menu is open.

Fixes carbon-design-system#16896
github-merge-queue bot pushed a commit that referenced this issue Sep 12, 2024
#17136)

* fix(FilterableMultiSelect): call onMenuChange when mouse click outside

This fixes an issue where a mouse click event outside of the menu
does not call the `onMenuChange` callback when the menu is open.

Fixes #16896

* docs(FilterableMultiSelect): add story action for `onMenuChange`

This adds an action recorder for `onMenuChange` in storybook.

---------

Co-authored-by: Taylor Jones <[email protected]>
@github-project-automation github-project-automation bot moved this from ⏱ Backlog to ✅ Done in Design System Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants