Browse Source

Another fix for queries.

pull/448/head
Sebastian 6 years ago
parent
commit
e72551e793
  1. 12
      frontend/app/shared/state/contents.state.ts
  2. 4
      frontend/app/shared/state/schemas.state.ts

12
frontend/app/shared/state/contents.state.ts

@ -125,8 +125,16 @@ export abstract class ContentsStateBase extends State<Snapshot> {
} }
public load(isReload = false): Observable<any> { public load(isReload = false): Observable<any> {
if (this.schemaId !== this.previousId) { if (!isReload) {
this.resetState(); if (this.schemaId !== this.previousId) {
this.resetState();
} else {
const contentsPager = this.snapshot.contentsPager;
const contentsQuery = this.snapshot.contentsQuery;
const contentsQueryJson = this.snapshot.contentsQueryJson;
this.resetState({ contentsPager, contentsQuery, contentsQueryJson });
}
} }
return this.loadInternal(isReload); return this.loadInternal(isReload);

4
frontend/app/shared/state/schemas.state.ts

@ -138,7 +138,9 @@ export class SchemasState extends State<Snapshot> {
public load(isReload = false): Observable<any> { public load(isReload = false): Observable<any> {
if (!isReload) { if (!isReload) {
this.resetState({ selectedSchema: this.snapshot.selectedSchema }); const selectedSchema = this.snapshot.selectedSchema;
this.resetState({ selectedSchema });
} }
return this.loadInternal(isReload); return this.loadInternal(isReload);

Loading…
Cancel
Save