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]: Click on DataTable filter menu item opens row context menu instead #14387

Closed
2 tasks done
btepe opened this issue Aug 3, 2023 · 6 comments
Closed
2 tasks done

Comments

@btepe
Copy link

btepe commented Aug 3, 2023

Package

@carbon/react

Browser

Chrome, Firefox

Package version

v1.34.0

React version

v18.2.0

Description

We have a DataTable with a MultiSelect for filtering in the toolbar and an OverflowMenu in each row. There seems to be a conflict between the dropdown of the multi select and the icon buttons of the context menus underneath:

Screenshot 2023-08-03 at 17 40 55

For some reason, when hovering over one of the checkboxes/labels that are right above one of the context menu triggers, the icon button hover styles are applied and it is clickable. When you click in this area of the checkbox label, the dropdown of the multi select is closed and the context menu of the row is opened.

Reproduction/example

https://stackblitz.com/edit/carbon-v11-fvaiap?file=src%2FApp.jsx

Steps to reproduce

  1. Open filter dropdown by clicking on Protocol Filter Options.
  2. Hover over one of the checkbox labels, right where the context menu of the data table row is underneath.
  3. Click -> Context menu of the row underneath opens and filter menu closes.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@ffshreyansh
Copy link

Hello, @btepe

I Tried these minor changes using the zIndex in the given example and it worked as shown in below screenshot.
Can we move ahead with this solution??

Capture

@btepe
Copy link
Author

btepe commented Aug 7, 2023

@ffshreyansh Thank you for looking into this! In your screenshot, it looks like the underlying context menu can still be clicked from inside the multiselect dropdown. Could you share a forked stackblitz or where you applied the z-index, so I can test it?

@ffshreyansh
Copy link

@btepe Sure !! Pls Check here: https://stackblitz.com/edit/carbon-v11-e9nxmi?file=src%2FApp.jsx Line No.: 134
Please let me know if this is what you were looking for the solution or I misunderstood.

@tw15egan
Copy link
Collaborator

tw15egan commented Aug 7, 2023

@btepe @ffshreyansh I tested your example, and it seems like any z-index fixes the issue, and then I remembered I worked on something similar to this a few weeks ago. If you update your example to 1.35.0 the issue should be resolved 😄

@tw15egan
Copy link
Collaborator

tw15egan commented Aug 7, 2023

Closing as resolved, but feel free to let me know if there is something else I need to take a look at 👍🏻

@btepe
Copy link
Author

btepe commented Aug 8, 2023

@tw15egan Thank you for looking into this, the issue was indeed resolved by updating to 1.35.0 🎉

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

No branches or pull requests

3 participants