Skip to content

Commit

Permalink
Fixed #2269
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Aug 10, 2017
1 parent 8814791 commit 8789fc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/treetable/treetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {DomHandler} from '../dom/domhandler';
template: `
<div class="ui-treetable-row" [ngClass]="{'ui-state-highlight':isSelected(),'ui-treetable-row-selectable':treeTable.selectionMode && node.selectable !== false}">
<td *ngFor="let col of treeTable.columns; let i=index" [ngStyle]="col.style" [class]="col.styleClass" (click)="onRowClick($event)" (dblclick)="rowDblClick($event)" (touchend)="onRowTouchEnd()" (contextmenu)="onRowRightClick($event)">
<a href="#" *ngIf="i == treeTable.toggleColumnIndex" class="ui-treetable-toggler fa fa-fw ui-clickable" [ngClass]="{'fa-caret-down':node.expanded,'fa-caret-right':!node.expanded}"
<a href="#" *ngIf="i == treeTable.toggleColumnIndex" class="ui-treetable-toggler fa fa-fw ui-clickable" [ngClass]="node.expanded ? treeTable.expandedIcon : treeTable.collapsedIcon"
[ngStyle]="{'margin-left':level*16 + 'px','visibility': isLeaf() ? 'hidden' : 'visible'}"
(click)="toggle($event)"
[title]="node.expanded ? labelCollapse : labelExpand">
Expand Down Expand Up @@ -171,6 +171,10 @@ export class TreeTable implements AfterContentInit {
@Input() tableStyle: any;

@Input() tableStyleClass: string;

@Input() collapsedIcon: string = "fa-caret-right";

@Input() expandedIcon: string = "fa-caret-down";

@Output() onRowDblclick: EventEmitter<any> = new EventEmitter();

Expand Down
12 changes: 12 additions & 0 deletions src/app/showcase/components/treetable/treetabledemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,18 @@ <h3>Properties</h3>
<td>Collapse</td>
<td>Tooltip and screenreader text for collapse icon.</td>
</tr>
<tr>
<td>expandedIcon</td>
<td>string</td>
<td>fa-caret-down</td>
<td>Icon to display on an expanded node.</td>
</tr>
<tr>
<td>collapsedIcon</td>
<td>string</td>
<td>fa-caret-right</td>
<td>Icon to display on an expanded node.</td>
</tr>
<tr>
<td>selectionMode</td>
<td>string</td>
Expand Down

0 comments on commit 8789fc2

Please sign in to comment.