prevent link name to select row

This commit is contained in:
Cilibiu Bogdan
2019-07-08 12:31:45 +03:00
parent 120c030b2b
commit 79f3ad8840
2 changed files with 6 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
<div class="line">
<span *ngIf="isFile" (click)="showPreview()" class="link">
<span *ngIf="isFile" (click)="showPreview($event)" class="link">
{{ name$ | async }}
</span>
<span *ngIf="!isFile" (click)="navigate()" class="bold link">
<span *ngIf="!isFile" (click)="navigate($event)" class="bold link">
{{ name$ | async }}
</span>
<span>{{ title$ | async }}</span>

View File

@@ -121,11 +121,13 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy {
return this.node.entry.isFile;
}
showPreview() {
showPreview(event) {
event.stopPropagation();
this.store.dispatch(new ViewFileAction(this.node));
}
navigate() {
navigate(event) {
event.stopPropagation();
this.store.dispatch(new NavigateToFolder(this.node));
}
}