diff --git a/ivette/src/dome/src/renderer/table/arrays.ts b/ivette/src/dome/src/renderer/table/arrays.ts index cfa453a1c8bfcceb52e347ff91c9fd738a6d85ab..705ec7fd0d214947bfa69aca49718097b11a21a6 100644 --- a/ivette/src/dome/src/renderer/table/arrays.ts +++ b/ivette/src/dome/src/renderer/table/arrays.ts @@ -448,13 +448,18 @@ export class CompactModel<Key, Row> extends ArrayModel<Key, Row> { Requires a final trigger to update views. */ updateData(data: Collection<Row>) { forEach(data, (row: Row) => this.setData(this.getkey(row), row)); - this.reload(); } /** - Replace all previous data with the new one. + Replace all previous data with the new ones. Finally triggers a reload. */ + replaceAllDataWith(data: Collection<Row>) { + this.removeAllData(); + this.updateData(data); + this.reload(); + } + }