return (
<DataTable
title="Movie List - No additional info for old movies (Before 2000)"
columns={columns}
data={data}
expandableRows
expandableRowDisabled={row => row.disabled}
highlightOnHover
defaultSortField="name"
expandableRowsComponent={<ExpandedComponent />}
/>
Where it says expandableRowsComponent={}
According to the README file
A custom component to display in the expanded row. Must be passed as: MyExpander not .
Your component will have access to the row data. For example: const MyExpander = props =>
{props.data.name}
And in the stories/DataTable/Basic/Expandable.stories.js , it shows the correct code
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The documentation in https://jbetancur.github.io/react-data-table-component/?path=/story/expandable-rows--basic seems to be incorrect.
The error in the code is here:
Where it says expandableRowsComponent={ }
According to the README file
A custom component to display in the expanded row. Must be passed as: MyExpander not .
Your component will have access to the row data. For example: const MyExpander = props =>
And in the stories/DataTable/Basic/Expandable.stories.js , it shows the correct code
but this is not the case on the website.