Closed glaucoheitor closed 3 years ago
No worries, make sure you are passing LineChart
and not <LineChart />
What does your DataTable
code look like?
Yes, I was default exporting only, the other export was a test.
I was passing <LineChart />
on previous version with no issues, based on breaking changes on v7, I changed to LineChart
and now it's giving me that error msg.
return (
<DataTable
theme="custom"
title={title}
actions={actions}
columns={columns}
data={data}
customStyles={customStyles}
defaultSortFieldId={6}
defaultSortAsc={false}
expandableRows={true}
expandableRowsComponent={LineChart}
pagination={pagination}
responsive={responsive}
/>
);
That's strange. My suspicion is perhaps you still have RDT 6.x running instead of v7. Can you just make sure you have fully upgraded? Make sure your package.json has version 7.0.0 and do an npm
install or yarn
If you use npm then delete any package-lock.json and delete node_modules and then npm install again.
Sorry for the huge delay on this. I thought I had responded, but I guess I forgot.
Anyways, next day when I came back to continue my work it was working, so I'm not sure what caused it, but I do appreciate your help!
No worries. I'll mark this issue as closed.
I'm new to React and I might have oversaw something here, but when using
expandableRowsComponent
, if I pass JSX it works, but if I pass it as a function it gives meWarning: Failed prop type: Invalid prop children supplied to ExpanderRow
.I'm trying to update my code to v7.0.0
I'm importing the expandable component
import { LineChart } from "./Charts";
on my DataTables componentThis is the code for the expandable component:
It may be somethig super stupid, so I apologise in advance.