Answers for "react-data-table-component"

2

react-data-table-component

.... const data = [{ id: 1, title: 'Conan the Barbarian', summary: 'Orphaned boy Conan is enslaved after his village is destroyed...',  year: '1982' } ...];const columns = [  {    name: 'Title',    sortable: true,    cell: row => <div data-tag="allowRowEvents"><div style={{ fontWeight: bold }}>{row.title}</div>{row.summary}</div>,  },  {    name: 'Year',    selector: 'year',    sortable: true,    right: true,  },]; ... class MyComponent extends Component {  render() {    return (      <DataTable        title="Arnold Movies"        columns={columns}        data={data}        selectableRows        selectableRowsComponent={Checkbox}        selectableRowsComponentProps={{ inkDisabled: true }}        sortIcon={<FontIcon>arrow_downward</FontIcon>}        onSelectedRowsChange={handleChange}      />    )  }};
Posted by: Guest on November-25-2020

Code answers related to "react-data-table-component"

Code answers related to "Javascript"

Browse Popular Code Answers by Language