mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merged in CST-13397-fix-ssr-issue (pull request #1285)
fix ssr issue Approved-by: Stefano Maffei
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
<div>
|
||||
<ds-themed-search
|
||||
#searchComponent
|
||||
[configuration]="selectedSearchConfig$ | async"
|
||||
[showViewModes]="false"
|
||||
[searchEnabled]="false"
|
||||
|
@@ -3,7 +3,7 @@ import {
|
||||
Component,
|
||||
Inject,
|
||||
Input,
|
||||
OnInit, ViewChild
|
||||
OnInit
|
||||
} from '@angular/core';
|
||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
||||
import { Context } from '../../../../core/shared/context.model';
|
||||
@@ -12,7 +12,6 @@ import { Observable } from 'rxjs';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ThemedSearchComponent } from '../../../../shared/search/themed-search.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-admin-notify-logs-result',
|
||||
@@ -29,8 +28,6 @@ export class AdminNotifyLogsResultComponent implements OnInit {
|
||||
@Input()
|
||||
defaultConfiguration: string;
|
||||
|
||||
@ViewChild('searchComponent') searchComponent: ThemedSearchComponent;
|
||||
|
||||
|
||||
public selectedSearchConfig$: Observable<string>;
|
||||
public isInbound$: Observable<boolean>;
|
||||
@@ -50,16 +47,19 @@ export class AdminNotifyLogsResultComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reset route state to default configuration
|
||||
*/
|
||||
public resetDefaultConfiguration() {
|
||||
// we prevent cache use on reset so that the result are rendered properly
|
||||
this.searchComponent.useCachedVersionIfAvailable = false;
|
||||
//Idle navigation to trigger rendering of result on same page
|
||||
this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
|
||||
this.router.navigate([this.getResolvedUrl(this.route.snapshot)], {
|
||||
queryParams: {
|
||||
configuration: this.defaultConfiguration,
|
||||
view: ViewMode.Table,
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user