Skip to content

Commit

Permalink
Fix URL change after reports link click #136
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Dec 4, 2023
1 parent adef39f commit cd0973c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[href]="reports[0]?.url"
target="_blank"
[class.disabled]="disableIfUnavailable && reports.length === 0"
(click)="$event.stopPropagation()"
>
<i class="material-icons">description</i>
</a>
Expand All @@ -20,7 +21,7 @@
<button
*ngFor="let report of reports"
ngbDropdownItem
(click)="openReport(report)"
(click)="openReport($event, report)"
>
{{ report.title }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export class ReportsLinkComponent {

dropdownId = uniqueId("reports-link-dropdown");

openReport(report: Report): void {
openReport(event: MouseEvent, report: Report): void {
event.stopPropagation();
window.open(report.url, "_blank");
}
}

0 comments on commit cd0973c

Please sign in to comment.