mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-03-30 17:34:29 +00:00
patch docs and story for #583
This commit is contained in:
@@ -62,6 +62,24 @@ const cellEdit = {
|
||||
}
|
||||
```
|
||||
|
||||
If you want to perform a async `beforeSaveCell`, you can do it like that:
|
||||
|
||||
```js
|
||||
const cellEdit: {
|
||||
// omit...
|
||||
beforeSaveCell(oldValue, newValue, row, column, done) {
|
||||
setTimeout(() => {
|
||||
if (confirm('Do you want to accep this change?')) {
|
||||
done(); // contine to save the changes
|
||||
} else {
|
||||
done(false); // reject the changes
|
||||
}
|
||||
}, 0);
|
||||
return { async: true };
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### <a name='afterSaveCell'>cellEdit.afterSaveCell - [Function]</a>
|
||||
This callback function will be called after updating cell.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user