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>
|
<div>
|
||||||
<ds-themed-search
|
<ds-themed-search
|
||||||
#searchComponent
|
|
||||||
[configuration]="selectedSearchConfig$ | async"
|
[configuration]="selectedSearchConfig$ | async"
|
||||||
[showViewModes]="false"
|
[showViewModes]="false"
|
||||||
[searchEnabled]="false"
|
[searchEnabled]="false"
|
||||||
|
@@ -3,7 +3,7 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
Inject,
|
Inject,
|
||||||
Input,
|
Input,
|
||||||
OnInit, ViewChild
|
OnInit
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
@@ -12,7 +12,6 @@ import { Observable } from 'rxjs';
|
|||||||
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { ThemedSearchComponent } from '../../../../shared/search/themed-search.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-logs-result',
|
selector: 'ds-admin-notify-logs-result',
|
||||||
@@ -29,8 +28,6 @@ export class AdminNotifyLogsResultComponent implements OnInit {
|
|||||||
@Input()
|
@Input()
|
||||||
defaultConfiguration: string;
|
defaultConfiguration: string;
|
||||||
|
|
||||||
@ViewChild('searchComponent') searchComponent: ThemedSearchComponent;
|
|
||||||
|
|
||||||
|
|
||||||
public selectedSearchConfig$: Observable<string>;
|
public selectedSearchConfig$: Observable<string>;
|
||||||
public isInbound$: Observable<boolean>;
|
public isInbound$: Observable<boolean>;
|
||||||
@@ -50,15 +47,18 @@ export class AdminNotifyLogsResultComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset route state to default configuration
|
||||||
|
*/
|
||||||
public resetDefaultConfiguration() {
|
public resetDefaultConfiguration() {
|
||||||
// we prevent cache use on reset so that the result are rendered properly
|
//Idle navigation to trigger rendering of result on same page
|
||||||
this.searchComponent.useCachedVersionIfAvailable = false;
|
this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
|
||||||
this.router.navigate([this.getResolvedUrl(this.route.snapshot)], {
|
this.router.navigate([this.getResolvedUrl(this.route.snapshot)], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
configuration: this.defaultConfiguration,
|
configuration: this.defaultConfiguration,
|
||||||
view: ViewMode.Table,
|
view: ViewMode.Table,
|
||||||
},
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user