-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
onCellClick is not triggered on last row cell (extend row full width cell) #4316
Comments
Please provide a minimal reproduction test case with the latest version. This would help a lot 👷 . |
I've added a codesandbox example here: https://codesandbox.io/s/datagrid-v5-quick-start-forked-u47dhv?file=/src/App.tsx I activated When you click on one of those cells |
For the long term, it sounds this issue is related to #4308 This problem would not occur if the last column was extended to fill the remaining space For a faster solution, the component you want to click on is not a cell so it should not trigger the I can propose you some work arounds
|
That would probably the best solution.
I didn't notice that - Thanks for the hint! I switched back to |
Duplicates
Latest version
Current behavior 😯
The last cell which only extends the row to reach full width isn't triggering the
onCellClick
callback.In my layout most data grids are full width so in cases with only a few columns the last cell might be the biggest and therefore it's possible that a user clicks on it.
Why I don't use
onRowClick
:Previously I was redirecting my users
onRowClick
to a details view of the grid entry.Due to a change
onRowClick
started to also triggered when selecting a grid entry via checkbox #3805 so I needed to replace it withonCellClick
to imitate the old behavior.Expected behavior 🤔
The last cell should also triggering
onCellClick
callback.Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
35878
The text was updated successfully, but these errors were encountered: