Skip to content

Commit

Permalink
fix: prevent header event propagation on button click
Browse files Browse the repository at this point in the history
  • Loading branch information
StephGit committed Dec 24, 2024
1 parent 6d89c35 commit b8cce75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion AMW_angular/io/src/app/shared/tile/tile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { TileListComponent, TileListEntry, TileListEntryOutput } from './tile-li
</div>
@if (canAction()) {
<div class="tile-action-bar">
<app-button [variant]="'primary'" [size]="'sm'" (click)="tileAction.emit()">
<app-button [variant]="'primary'" [size]="'sm'" (click)="doTileAction($event)">
<app-icon icon="plus-circle" />
<span>{{ actionName() }}</span></app-button
>
Expand Down Expand Up @@ -91,4 +91,10 @@ export class TileComponent {
toggleBody() {
this.showBody.set(!this.showBody());
}

doTileAction(event: any) {
event.preventDefault();
event.stopPropagation();
this.tileAction.emit();
}
}

0 comments on commit b8cce75

Please sign in to comment.