gregnb / gregnb/mui-datatables
Question: How to have custom row ids?
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
I would like to have the id from my database be used as the key/id for the row. Currently when I try to handle delete it returns the local id which is just the position of the data in the table. Based on this I would have to create a map of local id -> database id before I pass in the data. Is there a way to get more helpful data from the handler, or override the id with your own?
The only option that provides cell data is `onRowClick` but if you select all cells there is no meaningful data to work with.
`rowsSelected` output:
```javascript
0: {index: 0, dataIndex: 0}
1: {index: 1, dataIndex: 1}
```
| Tech | Version |
|--------------|---------|
| Material-UI | 3.0.2 |
| MUI-datatables | 2.0.0-beta-32 |
| React | 16.4.1 |
| browser | chrome |
| etc | |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.