How to prevent row deselection in a Mui Datagrid?

Viewed 62

Currently using Mui 5 and ran into an interesting issue. There's a prop to prevent selection of a row - isRowSelectable; however, there doesn't seem to be a way to prevent de-selection of a row.

Here's the use case: when the user selects all, we want to prevent them from deselecting any individual rows (until they deselect all).

Example of isRowSelectable (https://codesandbox.io/s/nez8ec?file=/demo.tsx) need one for controlling deselection.

0 Answers
Related