Skip to content

Commit

Permalink
This closes #267, data update problem resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrn committed Mar 4, 2019
1 parent 95e87b8 commit 4030cde
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-table",
"version": "1.19.1",
"version": "1.19.2",
"description": "Datatable for React based on https://material-ui.com/api/table/ with additional features",
"main": "dist/material-table.js",
"types": "index.d.ts",
Expand Down
9 changes: 9 additions & 0 deletions src/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ class App extends Component {
grouping: true
}}
/>
<button
onClick={() => {
const data = [...this.state.data];
data.push({ id: 7, name: 'ex2', surname: 'Baran', birthYear: 1987, birthCity: 34, sex: 'Female', type: 'child' });

this.setState({ data });
}}
>
Add
</button>
</div>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/data-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export default class DataManager {
}
return row;
});

this.filtered = false;
}

setColumns(columns) {
Expand Down

0 comments on commit 4030cde

Please sign in to comment.