How to close an expanded detailPanel when I click the button on it
detailPanel = {
[
rowData => ({
icon: "chevron_left",
openIcon: "expand_more",
render: () =>
<div onClick={() => closeExpandedPanel()}>
{rowData.nameObject}
</div>,
}),
]
}
in the onClick method, insert this ; it will toggle the detail panel linked to your row :
tableRef.current.onToggleDetailPanel([rowData.tableData.id], tableRef.current.props.detailPanel)
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. You can reopen it if it required.
Most helpful comment
in the onClick method, insert this ; it will toggle the detail panel linked to your row :
tableRef.current.onToggleDetailPanel([rowData.tableData.id], tableRef.current.props.detailPanel)