Skip to content

Commit

Permalink
fix(table): fix the actions column positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshaymisal5 authored and lexzhukov committed Mar 29, 2017
1 parent ec82199 commit ebfbd54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/ng2-smart-table/components/tbody/tbody.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[source]="source">
</ng2-st-tbody-edit-delete>
</td>
<td *ngIf="row.isInEditing" class="ng2-smart-actions">
<td *ngIf="row.isInEditing && grid.showActionColumn('left')" class="ng2-smart-actions">
<ng2-st-tbody-create-cancel [grid]="grid" [row]="row" [editConfirm]="editConfirm"></ng2-st-tbody-create-cancel>
</td>
<td *ngFor="let cell of row.getCells()">
Expand All @@ -27,6 +27,11 @@
[isInEditing]="row.isInEditing">
</ng2-smart-table-cell>
</td>

<td *ngIf="row.isInEditing && grid.showActionColumn('right')" class="ng2-smart-actions">
<ng2-st-tbody-create-cancel [grid]="grid" [row]="row" [editConfirm]="editConfirm"></ng2-st-tbody-create-cancel>
</td>

<td *ngIf="!row.isInEditing && grid.showActionColumn('right')" class="ng2-smart-actions">
<ng2-st-tbody-edit-delete [grid]="grid"
[deleteConfirm]="deleteConfirm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Row } from '../../../lib/data-set/row';
selector: '[ng2-st-thead-form-row]',
template: `
<td *ngIf="grid.isMultiSelectVisible()"></td>
<td class="ng2-smart-actions">
<td *ngIf= "grid.showActionColumn('left')" class="ng2-smart-actions">
<ng2-st-actions [grid]="grid" (create)="onCreate($event)"></ng2-st-actions>
</td>
<td *ngFor="let cell of grid.getNewRow().getCells()">
Expand All @@ -20,6 +20,9 @@ import { Row } from '../../../lib/data-set/row';
(edited)="onCreate($event)">
</ng2-smart-table-cell>
</td>
<td *ngIf= "grid.showActionColumn('right')" class="ng2-smart-actions">
<ng2-st-actions [grid]="grid" (create)="onCreate($event)"></ng2-st-actions>
</td>
`,
})
export class TheadFormRowComponent {
Expand Down

0 comments on commit ebfbd54

Please sign in to comment.