From 0f8fe89878b338bb95c9e56d66abe30e7bd59466 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 20 Nov 2019 18:21:10 +0100 Subject: [PATCH] Keep pager between schema switches. --- frontend/app/shared/state/contents.state.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/shared/state/contents.state.ts b/frontend/app/shared/state/contents.state.ts index 52aaabe7c..0e1be11a6 100644 --- a/frontend/app/shared/state/contents.state.ts +++ b/frontend/app/shared/state/contents.state.ts @@ -137,7 +137,9 @@ export abstract class ContentsStateBase extends State { public load(isReload = false): Observable { if (!isReload) { if (this.schemaId !== this.previousId) { - this.resetState(); + const contentsPager = Pager.fromLocalStore('contents', this.localStore); + + this.resetState({ contentsPager }); } else { const contentsPager = this.snapshot.contentsPager; const contentsQuery = this.snapshot.contentsQuery;