Upgrade DataTable to angular 2.0.0-rc.1

This commit is contained in:
Denys Vuika
2016-06-14 06:22:07 +01:00
parent 5bb011564e
commit a6cff4f235
10 changed files with 83 additions and 75 deletions

View File

@@ -14,7 +14,7 @@
</label>
</th>
<th class="mdl-data-table__cell--non-numeric non-selectable {{col.cssClass}}"
*ngFor="#col of data.getColumns()"
*ngFor="let col of data.getColumns()"
[class.column-header]="col.title"
[class.mdl-data-table__header--sorted-ascending]="isColumnSorted(col, 'asc')"
[class.mdl-data-table__header--sorted-descending]="isColumnSorted(col, 'desc')"
@@ -30,7 +30,7 @@
</thead>
<tbody>
<tr *ngFor="#row of data.getRows(); #idx = index">
<tr *ngFor="let row of data.getRows(); let idx = index">
<td *ngIf="multiselect">
<label
class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect mdl-data-table__select"
@@ -39,7 +39,7 @@
<input type="checkbox" [attr.id]="'row[' + idx + ']'" class="mdl-checkbox__input" [(ngModel)]="row.isSelected" />
</label>
</td>
<td *ngFor="#col of data.getColumns()" [ngSwitch]="col.type"
<td *ngFor="let col of data.getColumns()" [ngSwitch]="col.type"
class="mdl-data-table__cell--non-numeric non-selectable data-cell {{col.cssClass}}"
(click)="onRowClick(row, $event)" (dblclick)="onRowDblClick(row, $event)">
<div *ngSwitchWhen="'image'">

View File

@@ -20,7 +20,7 @@ import {
describe,
expect,
beforeEach
} from 'angular2/testing';
} from '@angular/core/testing';
import { DataTableComponent } from './datatable.component';
import {

View File

@@ -23,7 +23,7 @@ import {
Output,
EventEmitter,
AfterViewChecked
} from 'angular2/core';
} from '@angular/core';
import {
DataTableAdapter,

View File

@@ -19,7 +19,7 @@ import {
it,
describe,
expect
} from 'angular2/testing';
} from '@angular/core/testing';
import {
DataColumn,