Ruslan Ermahgerd
Ruslan Ermahgerd

Reputation: 455

MUI DataGrid disable row selection on cell click

I have a DataGrid with custom cells, when I click on cell to enter some text, it selects/deselects a row. Can I somehow set selection only on checkbox click? I tried to do something like this: onCellClick={(params, events) => events.stopPropagation()} but it didn't help. My example: https://codesandbox.io/s/serverless-moon-mg78zx?file=/src/App.js

Upvotes: 7

Views: 18464

Answers (2)

Wiharlley Yitzhak
Wiharlley Yitzhak

Reputation: 378

In 6.0> version, use:

disableRowSelectionOnClick

Upvotes: 12

volynets_26
volynets_26

Reputation: 154

Add disableSelectionOnClick props.

Upvotes: 13

Related Questions