insert multiple JSON documents

This commit is contained in:
Jan Prochazka
2021-12-02 15:20:56 +01:00
parent 5180e7ad27
commit 7575b59f4f
7 changed files with 97 additions and 37 deletions

View File

@@ -47,6 +47,15 @@ export default class FreeTableGrider extends Grider {
};
return this.currentModel.rows.length - 1;
}
insertDocuments(documents: any[]): number {
const model = this.currentModel;
this.currentModel = {
...model,
rows: [...model.rows, ...documents],
};
return this.currentModel.rows.length - documents.length;
}
deleteRow(index: number) {
const model = this.currentModel;
this.currentModel = {