Closed wilsonwg closed 3 years ago
Please see https://github.com/jbetancur/react-data-table-component/issues/888 for the correct syntax for version 6 and 7. Also notable documentation changes are being made prior to the imminent release of version 7
In Section 11, Expandable Rows
const ExpandableComponent = ({ data }) => ;
class MyComponent extends Component { render() { return ( <DataTable title="Arnold Movies" columns={columns} data={data} selectableRows selectableRowsComponent={Checkbox} selectableRowsComponentProps={{ inkDisabled: true }} sortIcon={arrow_downward }
onSelectedRowsChange={handleChange}
expandableRows
expandableRowsComponent={ExpandableComponent}
/>
)
}
};
I think it's better to be written as: expandableRowsComponent={ }
Otherwise it may lead to confusion and result errors.