Skip to content

Commit

Permalink
fix(tree-grid): update tree-grid template to allow custom row-edit, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorSlavov committed Jul 16, 2019
1 parent 8f4af7b commit 71f0f57
Showing 1 changed file with 17 additions and 3 deletions.
Expand Up @@ -156,14 +156,28 @@
</div>
</div>

<ng-template #defaultRowEditText>
You have {{ rowChangesCount }} changes in this row
</ng-template>

<ng-template #defaultRowEditActions>
<button igxButton igxRowEditTabStop (click)="endEdit(false, $event)">Cancel</button>
<button igxButton igxRowEditTabStop (click)="endEdit(true, $event)">Done</button>
</ng-template>

<ng-template #defaultRowEditTemplate>
<div class="igx-banner__message">
<span class="igx-banner__text">You have {{ rowChangesCount }} changes in this row</span>
<span class="igx-banner__text">
<ng-container
*ngTemplateOutlet="rowEditText ? rowEditText : defaultRowEditText; context: { $implicit: rowChangesCount }">
</ng-container>
</span>
</div>
<div class="igx-banner__actions">
<div class="igx-banner__row">
<button igxButton igxRowEditTabStop (click)="endEdit(false, $event)">Cancel</button>
<button igxButton igxRowEditTabStop (click)="endEdit(true, $event)">Done</button>
<ng-container
*ngTemplateOutlet="rowEditActions ? rowEditActions : defaultRowEditActions; context: { $implicit: endEdit.bind(this) }">
</ng-container>
</div>
</div>
</ng-template>
Expand Down

0 comments on commit 71f0f57

Please sign in to comment.