Skip to content

Commit

Permalink
fix: change columnChange to columnChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeButterball committed Jan 14, 2021
1 parent a11735b commit f271d82
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/src/app/gantt/gantt.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
(linkDragEnded)="linkDragEnded($event)"
(loadOnScroll)="loadOnScroll($event)"
>
<ngx-gantt-table (columnChange)="columnChange($event)">
<ngx-gantt-table (columnChanges)="columnChanges($event)">
<ngx-gantt-column name="标题" width="120px">
<ng-template #cell let-item="item">
{{ item.title }}
Expand Down
2 changes: 1 addition & 1 deletion example/src/app/gantt/gantt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class AppGanttExampleComponent implements OnInit {
this.printService.print(name);
}

columnChange(event: GanttTableEvent) {
columnChanges(event: GanttTableEvent) {
console.log(event);
}
}
4 changes: 2 additions & 2 deletions packages/gantt/src/components/table/gantt-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class GanttTableComponent implements OnInit {
const columnWidth = Math.max(width || 0, minColumnWidth);
column.columnWidth = coerceCssPixelValue(columnWidth);
if (this.gantt.table) {
this.gantt.table.columnChange.emit({ columns: this.columnList });
this.gantt.table.columnChanges.emit({ columns: this.columnList });
}

this.hideAuxiliaryLine();
Expand All @@ -117,7 +117,7 @@ export class GanttTableComponent implements OnInit {
});

if (this.gantt.table) {
this.gantt.table.columnChange.emit({ columns: this.columnList });
this.gantt.table.columnChanges.emit({ columns: this.columnList });
}

this.hideAuxiliaryLine();
Expand Down
2 changes: 1 addition & 1 deletion packages/gantt/src/table/gantt-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { GanttTableEvent } from '../class';
template: ''
})
export class NgxGanttTableComponent implements OnInit {
@Output() columnChange = new EventEmitter<GanttTableEvent>();
@Output() columnChanges = new EventEmitter<GanttTableEvent>();

constructor() {}

Expand Down

0 comments on commit f271d82

Please sign in to comment.