You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (
<MUIDataTable data={data} columns={cols} options={this.getOptions()} />
);
}
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)
The text was updated successfully, but these errors were encountered:
rubenp9
changed the title
Data as array of objectswith properties which have a "dot"
Data as array of objects with properties which have a "dot"
Sep 10, 2019
@rubenp9 Nice find. Yes, this is an unintended consequence of enabling nested data access through the standard dot notation. I'm open to suggestions about how to work around this. It's a little messy, but we could add an option like enableNestedDataAccess which could be flagged on or off to enabled/disable parsing the dot.
Hello,
I think that there is a bug when you use data as array of object with properties which have a "dot":
To solve that I have to replace using
'9.1'.replace('.', '_')
or something similar.Any suggestions?
The text was updated successfully, but these errors were encountered: