Skip to content

Commit 71f0f57

Browse files
committed
fix(tree-grid): update tree-grid template to allow custom row-edit, #5431
1 parent 8f4af7b commit 71f0f57

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,28 @@
156156
</div>
157157
</div>
158158

159+
<ng-template #defaultRowEditText>
160+
You have {{ rowChangesCount }} changes in this row
161+
</ng-template>
162+
163+
<ng-template #defaultRowEditActions>
164+
<button igxButton igxRowEditTabStop (click)="endEdit(false, $event)">Cancel</button>
165+
<button igxButton igxRowEditTabStop (click)="endEdit(true, $event)">Done</button>
166+
</ng-template>
167+
159168
<ng-template #defaultRowEditTemplate>
160169
<div class="igx-banner__message">
161-
<span class="igx-banner__text">You have {{ rowChangesCount }} changes in this row</span>
170+
<span class="igx-banner__text">
171+
<ng-container
172+
*ngTemplateOutlet="rowEditText ? rowEditText : defaultRowEditText; context: { $implicit: rowChangesCount }">
173+
</ng-container>
174+
</span>
162175
</div>
163176
<div class="igx-banner__actions">
164177
<div class="igx-banner__row">
165-
<button igxButton igxRowEditTabStop (click)="endEdit(false, $event)">Cancel</button>
166-
<button igxButton igxRowEditTabStop (click)="endEdit(true, $event)">Done</button>
178+
<ng-container
179+
*ngTemplateOutlet="rowEditActions ? rowEditActions : defaultRowEditActions; context: { $implicit: endEdit.bind(this) }">
180+
</ng-container>
167181
</div>
168182
</div>
169183
</ng-template>

0 commit comments

Comments
 (0)