-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac3d6ab
commit e371cb0
Showing
5 changed files
with
12 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { Component, OnInit, TemplateRef, Input, ViewChild, ElementRef, HostBinding } from '@angular/core'; | ||
import { GanttGroup } from '../../class/group'; | ||
import { Component, OnInit, TemplateRef, Input, ViewChild, ElementRef, HostBinding, Inject } from '@angular/core'; | ||
import { GanttGroupInternal } from '../../class/group'; | ||
import { GANTT_REF_TOKEN, GanttRef } from '../../gantt-ref'; | ||
|
||
@Component({ | ||
selector: 'gantt-table-group', | ||
templateUrl: './group.component.html', | ||
templateUrl: './group.component.html' | ||
}) | ||
export class GanttTableGroupComponent implements OnInit { | ||
@Input() group: GanttGroup; | ||
@Input() group: GanttGroupInternal; | ||
|
||
@Input() groupHeader: TemplateRef<any>; | ||
|
||
@Input() groupHeaderTitle: TemplateRef<any>; | ||
|
||
@HostBinding('class.gantt-table-group') ganttTableGroupClass = true; | ||
|
||
public isCollapse = false; | ||
|
||
constructor(public elementRef: ElementRef<HTMLDivElement>) {} | ||
constructor(public elementRef: ElementRef<HTMLDivElement>, @Inject(GANTT_REF_TOKEN) public ganttRef: GanttRef) {} | ||
|
||
ngOnInit() {} | ||
|
||
collapseGroup() { | ||
this.isCollapse = !this.isCollapse; | ||
this.group.expand = !this.group.expand; | ||
this.ganttRef.detectChanges(); | ||
} | ||
} |