-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
Using v7?
Yawps!
Describe the bug
Table rows aren't able to access the columns in data when they have a .
in the accessor key.
To Reproduce
With columns and data described below, the values for the broken column
are undefined.
const columns = [
{
Header: 'broken column',
accessor: 'first.column',
},
{
Header: 'working column',
accessor: 'first-column',
},
]
const data = [
{
'first.column': 'hello world',
'first-column': 'hello again',
},
{
'first.column': 'fizz',
'first-column': 'buzz',
},
]
...
<Table columns={columns} data={data} />
...
Expected behavior
I expect the cell to still be able to access the data even with dot
in the accessor key.
Codesandbox!
Use a new react-table codesandbox to reproduce the issue.
Screenshots
Desktop (please complete the following information):
- OS: iOS
- Browser: chrome
- Version: 79.0.3945.36 (Official Build) beta (64-bit)
Additional context
Not sure if this is by design or a limitation of my data model or a bug.
Metadata
Metadata
Assignees
Labels
No labels