mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1287: #3222 Remission Fix Trigger Init Search after Filter gets loaded, relocated u...
#3222 Remission Fix Trigger Init Search after Filter gets loaded, relocated update Cache function
This commit is contained in:
committed by
Lorenz Hilpert
parent
09bed1456e
commit
13d0ac0cbd
@@ -235,6 +235,13 @@ export class RemissionListComponentStore extends ComponentStore<RemissionState>
|
||||
}
|
||||
|
||||
this.setFilter(filter);
|
||||
|
||||
// Only trigger search with _filterChange$ if no cached data available
|
||||
// If cached data is available, there is no need to trigger the search
|
||||
const data = this.getCachedData();
|
||||
if (data.items?.length === 0) {
|
||||
this._filterChange$.next(true);
|
||||
}
|
||||
},
|
||||
(err) => {}
|
||||
)
|
||||
@@ -306,7 +313,6 @@ export class RemissionListComponentStore extends ComponentStore<RemissionState>
|
||||
});
|
||||
|
||||
this.setSearchResult(results);
|
||||
this.updateCache();
|
||||
this.setFetching(false);
|
||||
this._searchCompleted.next(this.get());
|
||||
},
|
||||
|
||||
@@ -196,6 +196,7 @@ export class RemissionListComponent implements OnInit, OnDestroy {
|
||||
this._onDestroy$.complete();
|
||||
|
||||
if (!!this._remissionStore.return) {
|
||||
this._remissionListStore.cacheCurrentData();
|
||||
const params = await this._activatedRoute.queryParams.pipe(first()).toPromise();
|
||||
await this.updateBreadcrumb(params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user