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

[data grid] GridActionsCellItem needs to be clicked twice to fire onClick only if using Iconify icon #16668

Open
brilliantinsane opened this issue Feb 20, 2025 · 2 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@brilliantinsane
Copy link

brilliantinsane commented Feb 20, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/react-n7urnk5j?file=Demo.tsx
  2. Open the console and check for the "clicked" log when clicking in the middle of an "eye" icon from Iconify
  3. Comment OUT the Iconify icon and comment IN the MUI icon and observe the logs

Current behavior

Currently, when using Iconify icon it needs to be pressed twice in order to fire the on-click event.

Expected behavior

It should work on the first click, no need to click twice.

Context

I went to https://mui.com/x/react-data-grid/column-definition/#column-types and on the first grid that showed I clicked Edit in StackBlitz, installed Iconify, and modified the code to showcase the issue.

Your environment

npx @mui/envinfo
   System:
    OS: macOS 15.3
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
    pnpm: 9.13.2 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 133.0.6943.127
    Edge: Not Found
    Safari: 18.3
  npmPackages:
    @emotion/react: ^11.13.5 => 11.14.0
    @emotion/styled: ^11.13.5 => 11.14.0
    @mui/base:  5.0.0-beta.69
    @mui/core-downloads-tracker:  6.4.4
    @mui/icons-material: ^6.4.4 => 6.4.4
    @mui/lab: ^6.0.0-beta.17 => 6.0.0-beta.27
    @mui/material: ^6.4.5 => 6.4.4
    @mui/private-theming:  6.4.3
    @mui/styled-engine:  6.4.3
    @mui/system:  6.4.3
    @mui/types:  7.2.21
    @mui/utils:  6.4.3
    @mui/x-charts: ^7.27.0 => 7.27.0
    @mui/x-charts-vendor:  7.20.0
    @mui/x-data-grid: ^7.27.0 => 7.27.0
    @mui/x-data-grid-premium: ^7.27.0 => 7.27.0
    @mui/x-data-grid-pro:  7.27.0
    @mui/x-date-pickers: ^7.27.0 => 7.27.0
    @mui/x-date-pickers-pro: ^7.27.0 => 7.27.0
    @mui/x-internals:  7.26.0
    @mui/x-license:  7.26.0
    @types/react: ^18.3.12 => 18.3.18
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    typescript: ^5.7.2 => 5.7.3

Search keywords: data grid, GridActionsCellItem, action button, click twice

@brilliantinsane brilliantinsane added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 20, 2025
@github-actions github-actions bot changed the title [DataGrid] GridActionsCellItem needs to be clicked twice to fire onClick only if using Iconify icon [data grid] GridActionsCellItem needs to be clicked twice to fire onClick only if using Iconify icon Feb 20, 2025
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Feb 20, 2025
@michelengelen
Copy link
Member

This has been reported a few times already. I found 2 similar issues:

I can also confirm this. Clicking directly on the icon does not work the first time. However clicking the edge of the button, so past the icon, works.

I'll add this to the board. 👍🏼

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 21, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Feb 21, 2025
@jyash97
Copy link

jyash97 commented Feb 21, 2025

@michelengelen

Can I take a stab at these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

3 participants