gregnb / gregnb/mui-datatables
Data as array of objects with properties which have a "dot"
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I think that there is a bug when you use data as array of object with properties which have a "dot":
```
render() {
const { tableData } = this.props;
let cols = [
{
name: '1',
label: 'ID 1'
},
{
name: '1_1',
label: 'ID 1_1'
},
{
name: '9.1',
label: 'ID 9.1'
}
];
let data = [
{
'1': 'it works',
'1_1': 'it works',
'9.1': 'it does not work'
},
{
'1': 'it works again',
'1_1': 'it works again',
'9.1': 'it does not work yet'
}
];
return (
);
}
```
To solve that I have to replace using `'9.1'.replace('.', '_')` or something similar.
Any suggestions?
| Tech | Version |
|--------------|---------|
| Material-UI | 3.9.3 |
| MUI-datatables | 2.9.0 |
| React | 16.8.6 |
| browser | Google Chrome Version 76.0.3809.132 (Official Build) (64-bit) |
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by reproducing the provided render example with a data property named "9.1", then trace how the table resolves column names against object properties. Done means dotted property names display their values without requiring callers to rename them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100