Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix(entity-grid): Disable row onClick on action cell
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Apr 27, 2018
1 parent 6558e0f commit 8ba739e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h4>{{title | translate}}</h4>
</td>
</tr>
<tr *ngFor="let item of items; trackBy: trackByFn;" (dblclick)="onDblClick(item)" [ngClass]="{'info':isSelected(item)}">
<td *ngFor="let col of columns" (click)="toggle(item, col)" class="{{(columnsClasses && columnsClasses[col])?columnsClasses[col]:''}}"
<td *ngFor="let col of columns" (click)="col!=='action'?toggle(item, col):null" class="{{(columnsClasses && columnsClasses[col])?columnsClasses[col]:''}}"
[ngClass]="{'text-center':col==='action','width-100': enableUpdateAndDelete && col==='action','width-50': enableOnlyUpdateOrDelete && col==='action'}">
<ng-container *ngTemplateOutlet="gridCellTemplate ? gridCellTemplate : defaultGridCellTemplate, context: { $implicit: {field:{name:col},item:item} }"></ng-container>
</td>
Expand Down Expand Up @@ -102,7 +102,7 @@ <h4>{{title | translate}}</h4>
<ng-container *ngTemplateOutlet="ctx.field.name==='action' ? gridFieldActionContent : gridFieldContent, context: { $implicit: ctx }"></ng-container>
</ng-template>
<ng-template #gridFieldContent let-ctx>
<span translate>{{strings[ctx.field.name]}}</span>
<span>{{strings[ctx.field.name] | translate}}</span>
<div class="pull-right entity-field-buttons" *ngIf="!orderColumns||orderColumns.indexOf(ctx.field.name)!==-1">
<button type="button" class="btn btn-link btn-xs" (click)="onChangeOrder(ctx.field.name)">
<i class="fa " [ngClass]="{'fa-sort':ctx.field.name!==orderBy && '-'+ctx.field.name!==orderBy,'fa-sort-amount-asc':ctx.field.name===orderBy,'fa-sort-amount-desc':'-'+ctx.field.name===orderBy}"
Expand Down

0 comments on commit 8ba739e

Please # to comment.