From 4c0bdbbc50829019bba48bb9af16d4508fe89344 Mon Sep 17 00:00:00 2001 From: walkerkay Date: Tue, 5 Nov 2024 13:50:01 +0800 Subject: [PATCH] fix: fix ngx-gantt-table itemClick event not work #472 --- example/src/app/gantt/gantt.component.html | 1 + example/src/app/gantt/gantt.component.ts | 5 +++++ packages/gantt/src/class/event.ts | 5 ++++- .../components/table/body/gantt-table-body.component.html | 2 +- packages/gantt/src/gantt.component.ts | 5 +++++ packages/gantt/src/table/gantt-table.component.ts | 7 +++++-- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/example/src/app/gantt/gantt.component.html b/example/src/app/gantt/gantt.component.html index 738b731d..3880e497 100644 --- a/example/src/app/gantt/gantt.component.html +++ b/example/src/app/gantt/gantt.component.html @@ -49,6 +49,7 @@ { item: GanttItem; } -export class GanttSelectedEvent { +export class GanttTableItemClickEvent { event: Event; current?: GanttItem; +} + +export class GanttSelectedEvent extends GanttTableItemClickEvent { selectedValue: GanttItem | GanttItem[]; } diff --git a/packages/gantt/src/components/table/body/gantt-table-body.component.html b/packages/gantt/src/components/table/body/gantt-table-body.component.html index bd3cf158..8216cb82 100644 --- a/packages/gantt/src/components/table/body/gantt-table-body.component.html +++ b/packages/gantt/src/components/table/body/gantt-table-body.component.html @@ -33,7 +33,7 @@
(); + @Output() itemClick = new EventEmitter(); + @ContentChild('rowBeforeSlot', { static: true }) rowBeforeTemplate: TemplateRef; @ContentChild('rowAfterSlot', { static: true }) rowAfterTemplate: TemplateRef;