mongo query splitter, copy as mongo insert

This commit is contained in:
Jan Prochazka
2021-12-02 10:00:48 +01:00
parent 368993597c
commit 536897a84c
10 changed files with 67 additions and 14 deletions

View File

@@ -89,10 +89,12 @@ export class CollectionGridDisplay extends GridDisplay {
setConfig: ChangeConfigFunc,
cache: GridCache,
setCache: ChangeCacheFunc,
loadedRows
loadedRows,
changeSet
) {
super(config, setConfig, cache, setCache, driver);
this.columns = analyseCollectionDisplayColumns(loadedRows, this);
const changedDocs = _.compact([...changeSet.inserts, ...changeSet.updates].map(chs => chs.document));
this.columns = analyseCollectionDisplayColumns([...(loadedRows || []), ...changedDocs], this);
this.filterable = true;
this.sortable = true;
this.editable = true;