Carbondesignsystem tableselectrow bing проверить состояние в react js
i am using carbon design system with react i need control Ceheck state of TableSelectRow. how can i do bind selected row to the datatable
<pre><TableBody> {rows.map((row) => ( <TableRow key={row.id}> <TableSelectRow {...getSelectionProps({ row, onClick: () => setRowData(row), })} /> {row.cells.map((cell) => ( <TableCell key={cell.id}>{cell.value}</TableCell> ))} </TableRow> ))} </TableBody>
Что я уже пробовал:
normally when screen render and then json data list bind to the carbon datatable, as u can see m code. i am using TableSelectRow so grid has checkbox. normally, i can check of the tables rows and then take in the state. so, when page render again, table rows should be selected