I'm working with react TSX, I have a Datagrid on which checkbox selection is enabled. I want to disable selection for certain rows. I came to know that isRowSelectable prop is used in the material UI data grid for that purpose.
Reference : https://material-ui.com/components/data-grid/selection/#disable-selection-on-certain-rows
https://codesandbox.io/s/dxgt5?file=/demo.js
But when I use this in my code below
<DataGrid autoPageSize pagination
rows={Records}
columns={columns}
isRowSelectable = {(params:any) =>params.Records.Status = "success"}
checkboxSelection />
It gives me the below error
Property 'isRowSelectable' does not exist on type 'IntrinsicAttributes & Pick<GridComponentProps
Detailed error:
Type '{ autoPageSize: true; pagination: true; rows: never[]; columns: GridColDef[]; isRowSelectable: (params: any) => boolean; checkboxSelection: true; onSelectionModelChange: (e: GridSelectionModelChangeParams) => void; }' is not assignable to type 'IntrinsicAttributes & Pick<GridComponentProps, "autoHeight" | "rowHeight" | "headerHeight" | "scrollbarSize" | "columnBuffer" | ... 52 more ... | "getRowId"> & { ...; } & RefAttributes<...>'. Property 'isRowSelectable' does not exist on type 'IntrinsicAttributes & Pick<GridComponentProps, "autoHeight" | "rowHeight" | "headerHeight" |
I searched for a solution but couldn't find one. Can someone please help me with that?