I am very new to react and wanted to handle row expand/collapse in a prime react data table. I am trying to keep only one row expanded at a time
const onRowToggle = ( e) => { setExpandedRows(e.data); }
I am using above line for that purpose. Please help!
If you want to have only one row expanded, then remove
onRowToggle
from yourDataTable
component and implement the followingonRowExpand
method