Skip to content

Commit

Permalink
Merge pull request #27 from bolzplatzarena/26-the-events-on-the-table…
Browse files Browse the repository at this point in the history
…-edit-view-delete-do-not-provide-the-clicked-element

26 the events on the table edit view delete do not provide the clicked element
  • Loading branch information
rengert authored Nov 1, 2023
2 parents ee21b24 + a0aeb9c commit 9e793c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion projects/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bolzplatzarena/components",
"version": "0.9.0",
"version": "0.9.1",
"author": "Thomas Renger",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<button
mat-icon-button
[matMenuTriggerFor]="menu"
[matMenuTriggerData]="element"
[matMenuTriggerData]="{ element: element }"
aria-label="Actions">
<fa-icon icon="ellipsis-vertical"></fa-icon>
</button>
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/table/table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ <h3 translate>content.headline.static_data</h3>
[columns]="['name', 'level', 'type', 'health', 'birthday']"
[dataset]="data"
[pageSizeOptions]="[7, 14, 21]"
(deleteEvent)="die()"
(editEvent)="view()"
(deleteEvent)="die($event)"
(editEvent)="view($event)"
translateKey="hero.components.hero-list.">
</bpa-table>
</section>
Expand All @@ -26,8 +26,8 @@ <h3 translate>content.headline.no_paging</h3>
[dataset]="data"
[pageSizeOptions]="[7, 14, 21]"
[paging]="false"
(deleteEvent)="die()"
(editEvent)="view()"
(deleteEvent)="die($event)"
(editEvent)="view($event)"
translateKey="hero.components.hero-list.">
</bpa-table>
</section>
Expand All @@ -37,8 +37,8 @@ <h3 translate>content.headline.observables</h3>
[columns]="['name', 'level', 'type', 'health', 'birthday', 'custom']"
[dataset]="data$ | async"
progressBar="always"
(deleteEvent)="die()"
(editEvent)="view()"
(deleteEvent)="die($event)"
(editEvent)="view($event)"
translateKey="hero.components.hero-list.">
</bpa-table>
<h3 class="tw-p-4" translate>content.headline.options</h3>
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ export class TableComponent {
takeUntilDestroyed(),
);

protected die(): void {
alert('Die');
protected die(hero: Hero): void {
alert(`Die: ${hero.name}`);
}

protected view(): void {
alert('View');
protected view(hero: Hero): void {
alert(`View: ${hero.name}`);
}
}

0 comments on commit 9e793c8

Please sign in to comment.