HI. I understand this issue has already been reported and relates to version update. Has it been fixed? If not, are there any workarounds or new methods to CRUD rows? Many thanks.
I just opened an issue about it #1417
In the examples, change const data = this.state.data; to const data = Array.from(this.state.data); that will do the trick.
Guy
Worked like a charm. Thanks, Guy!
wow awesome, thankyou @guyla is worked like charm.
@guyla can you explain what happend ? why we can't use
const data = this.state.data;
My opinion we must update documentation at here because example not work well when update
https://material-table.com/#/docs/features/editable
Thanks
this occurs because of the indexOf isn't return the index as expected
a better solution is to use oldData.tableData.id to get the index of the row
instead, const index = data.indexOf(oldData) try const index = oldData.tableData.id
the docs are being updated
Examples provided are incorrect
I just opened an issue about it #1417
In the examples, change
const data = this.state.data;toconst data = Array.from(this.state.data);that will do the trick.Guy
great
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Most helpful comment
I just opened an issue about it #1417
In the examples, change
const data = this.state.data;toconst data = Array.from(this.state.data);that will do the trick.Guy