Row select malfunction with initial selecting of rows and column sorting
After initial row selection (by option "rowsSelected") and initial sorting (by "options: {sortDirection: 'asc'}"), when you try to select or unselect row, changes are made to entirely different row. After clearing selection, selecting of rows works fine.
My guess is that initial selection happens before sorting, thus indexes in selectedRowsData are not the same as in the displayed data.
Expected Behavior
After first render of table with sorting and initial selection, when you select\unselect any row, changes are made to this row.
Current Behavior
After first render of table with sorting and initial selection, when you select\unselect any row, changes are made to different row.
Snapshot of options
const tableColumns = [
{name: 'Column1', options: {sortDirection: 'asc'}},
{name: 'Column2'},
];
const tableOptions = {
selectableRows: true,
rowsSelected: [0, 1, 2],
Environment
| Tech | Version |
|---|---|
| Material-UI | 3.3.1 |
| MUI-datatables | 2.6.2 |
| React | 16.8.6 |
| browser | Chrome |
Thank you for reporting this, I should have a fix soon.
Should be fixed in 2.6.3.