mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2745] Viewer - return to location on close (#1196)
* use viewNodeExtras when calling action * open viewer based on ViewNodeExtras data * resolve closing destination based on ViewNodeExtras query params * remove unused param * call ViewNodeAction with correct params * update tests * update docs
This commit is contained in:
@@ -126,7 +126,7 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy {
|
||||
showPreview(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
this.store.dispatch(
|
||||
new ViewNodeAction(this.node.entry.id, this.router.url)
|
||||
new ViewNodeAction(this.node.entry.id, { location: this.router.url })
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -305,7 +305,9 @@ describe('SearchComponent', () => {
|
||||
|
||||
component.onNodeDoubleClick(node);
|
||||
|
||||
expect(component.showPreview).toHaveBeenCalledWith(node, router.url);
|
||||
expect(component.showPreview).toHaveBeenCalledWith(node, {
|
||||
location: router.url
|
||||
});
|
||||
});
|
||||
|
||||
it('should re-run search on pagination change', () => {
|
||||
|
@@ -253,7 +253,7 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
this.showPreview(node, this.router.url);
|
||||
this.showPreview(node, { location: this.router.url });
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user