gregnb / gregnb/mui-datatables
No rerender when updating data
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
I have a table of objects `this.state.rows` to be rendered into an interactive data table that allows user to modify a certain field. When user clicks on a row, my custom dialog will show up and ask information. When user accepte it, I modify the data by `this.setState({rows: newRows})`. The problem is no rerender occurs and the table remains unchanged.
## Expected Behavior
The table updates as new data is pushed into.
## Current Behavior
The table remains unchanged.
## Steps to Reproduce (for bugs)
I simplify the step of showing dialog and mutating data. Just click the button "Change data" and all values of the first column will be appended "1".
https://codesandbox.io/s/yjv1o52o7z
## Your Environment
| Tech | Version |
|--------------|---------|
| Material-UI | 3.9.3 |
| MUI-datatables | 2.1.0 |
| React | 16.8.6 |
| browser | Firefox 66.0.5 64bits |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.