Editable

More info

Usage#

import MaterialTable from "@material-table/core";
<MaterialTable
// ...
editable={{
onBulkUpdate: (changes) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
onRowAddCancelled: (rowData) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
onRowUpdateCancelled: (rowData) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
onRowAdd: (newData) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
onRowUpdate: (newData, oldData) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
onRowDelete: (oldData) => {
return new Promise((resolve, reject) => {
// Must return a Promise
});
},
}}
// ...
/>;

Live Demo#

note

See here for more on the GLOBAL_VARS we use in our demos

Live Editor
Result