Closed shravankumartalabhaktula closed 4 years ago
I would pass the function as a prop inside <DataTable ...your orig code expandableRowsComponent={<ExpanableComponents handleSubTaskStatusUpdate={ this.handleSubTaskStatusUpdate }/>} />
And call const ExpanableComponents = ({ props }) => < ExpandableComponent data={props.subTasks} handleSubTaskStatusUpdate={ props.handleSubTaskStatusUpdate } />;
Not too sure if thats the right way to do it or not but it should be working.
Hi @leungs420 Yes, I tried the same logic what you have referred in your response but still no luck.
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.
Hi,
First of all I'd like to apologise if this is not a right channel to ask support / help for issues.
Need help
My expandable component renders a list by using the data props sent with the component. The data is rendered via "ListGroupItem" from reactstrap library. When I place "onClick" function to the list item, that event handling / click function is not working. I'm struggling to find a way to pass function as a props to expandable component.
I need to have a click action in list item so that I'm would be able to capture my data id and send it back to my main component where all the actions takes place.
Code
Expandable component is here
Can you please point me out to the right directions or any hints / solutions would be highly appreciated. Once again I apologise if this is not a right platform to ask questions as I have searched for a while for support channel. Thank you so much.