I got stuck on a problem where I want to give some properties to a customCompontent.
I have a react component scoutingList that prints a list of players who are scouted at the moment. It's also possible to remove a player from this list by clicking on a button.
I also have a griddle component where the table is filled with data from a api call, except for the scout column for this column I made a customComponent.
return (
<Griddle
columns={["scout", "name", "club", "position", "points", "rpoints", "avgpoints", "value"]}
results={this.state.data}
/>
)
This customComponent should render a button with the text "Scout" or "Scouted".
From my parent class I pass a state this.state.scoutedPlayers
what I want to pass to my customComponent. I hava found that you can pass extra data through customComponentMetaData, but it doesn't accepts props.
Anyone knows how to pass a property through a customComponent directly ?