save command refactor - moved to defining component

This commit is contained in:
Jan Prochazka
2021-04-08 07:58:06 +02:00
parent b553dbb6b9
commit c48b058b9d
9 changed files with 238 additions and 170 deletions

View File

@@ -110,11 +110,7 @@ export abstract class GridDisplay {
}
reload() {
this.setCache(cache => ({
// ...cache,
...createGridCache(),
refreshTime: new Date().getTime(),
}));
this.setCache(reloadDataCacheFunc);
}
includeInColumnSet(field: keyof GridConfigColumns, uniqueName: string, isIncluded: boolean) {
@@ -586,3 +582,11 @@ export abstract class GridDisplay {
}));
}
}
export function reloadDataCacheFunc(cache: GridCache): GridCache {
return {
// ...cache,
...createGridCache(),
refreshTime: new Date().getTime(),
};
}