What is the proper way to access the data
, rowData
, and metadata
props on a custom Griddle component? Despite seeing the props populated with my data in the react devtools (e.g. url and title for a link I want to build) the console gives me an error of "Unknown props rowData
, metadata
on <DownloadLink>
tag".
I've tried two approaches based on passing a customComponentMetadata
key/value and the way the documentation shows as per this, this, and the documentation.
const columnMetaData = [
// several objects until...,
{
customComponent: 'DownloadLink', // which I import from './components/DownloadLink'
customComponentMetadata: {
fileDetails: fileDetails // my array with url and title
}
}
];
My table receives this as props - <ResultsTable columnMetadata={columnMetadata} tableData={this.state.tableData} /> // tableData is the entire json object I want to display
.
Any help would be great. Thanks!