{ columns, data, enableColumnOrdering: true, //enable some features enableRowSelection: true, enablePagination: false, //disable a default feature onRowSelectionChange: setRowSelection, //hoist internal state to your own state (optional) state: { rowSelection }, //manage your own state, pass...
onRowSelectionChange={setRowSelection} //hoist internal state to your own state (optional) state={{ rowSelection }} //manage your own state, pass it back to the table (optional) tableInstanceRef={tableInstanceRef} //get a reference to the underlying table instance (optional) /> ); } `...
});//override MTableBodyRow to change the color of tablebody_checkboxclass MyMTableBodyRow extends MTableBodyRow{ renderSelectionColumn() {return( <TableCell padding="none" key="key-selection-column" style={{ width: 48 }}>{/*use createMuiTheme & MuiThemeProvider to change the style of tab...
Row Selection (Checkboxes) Editing (Text Fields) Column Filtering Global Filtering (Search) Column Hiding Detail Panel (Expanding) Expanding Sub-Rows (Tree) Column Grouping Aggregation Sticky Header/Footer Column Pinning (Sticky) Row Pinning (Sticky) ...
return(<MaterialReactTablecolumns={columns}data={data}enableColumnOrdering//enable some featuresenableRowSelectionenablePagination={false}//disable a default featureonRowSelectionChange={setRowSelection}//hoist internal state to your own state (optional)state={{rowSelection}}//manage your own state, ...
BREAKING CHANGE: onRowClick event provides object in the first param, not an array of strings as before If selectableRows option turned on, user can select record by click on any row cell, not just checkbox as before Added option showSelectedRowsToolbar: PropTypes.bool. Default True. When ...
onChange={(event) =>this.props.onRowSelected(event,this.props.path)} style={{ paddingLeft: 12 +this.props.level * 20, }} /> </MuiThemeProvider> </TableCell>); } } class MyTableHeader extends MTableHeader{ renderSelectionHeader() {return( ...
//override MTableBodyRow to change the color of tablebody_checkboxclass MyMTableBodyRow extends MTableBodyRow{ renderSelectionColumn() {return( <TableCell padding="none" key="key-selection-column" style={{ width: 48 }}>{/*use createMuiTheme & MuiThemeProvider to change the style of table...
onChange={(event) =>this.props.onRowSelected(event,this.props.path)} style={{ paddingLeft: 12 +this.props.level * 20, }} /> </MuiThemeProvider> </TableCell>); } } class MyTableHeader extends MTableHeader{ renderSelectionHeader() {return( ...
function(rowsDeleted: object(lookup: {[dataIndex]: boolean}, data: arrayOfObjects: {index: number, dataIndex: number}), newTableData) => void OR false (Returning false prevents row deletion.) onRowSelectionChange function Callback function that triggers when row(s) are selected/deselected. ...