Skip to content

Commit 6248287

Browse files
committed
rebase
1 parent c0d6e3c commit 6248287

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

src/demo-app/data-table/data-table-demo.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
<button md-raised-button (click)="connect()">Connect New Data Source</button>
33
<button md-raised-button (click)="disconnect()" [disabled]="!dataSource">Disconnect Data Source</button>
44

5-
<button md-raised-button (click)="_peopleDatabase.shuffle(changeReferences)">Randomize Data</button>
6-
<md-checkbox [(ngModel)]="changeReferences">Change references</md-checkbox>
7-
8-
<span>Track By</span>
9-
<md-radio-group [(ngModel)]="trackByStrategy">
10-
<md-radio-button [value]="'id'">ID</md-radio-button>
11-
<md-radio-button [value]="'reference'">Reference</md-radio-button>
12-
<md-radio-button [value]="'index'">Index</md-radio-button>
13-
</md-radio-group>
5+
<div>
6+
<button md-raised-button (click)="_peopleDatabase.shuffle(changeReferences)">Randomize Data</button>
7+
<md-checkbox [(ngModel)]="changeReferences">Change references</md-checkbox>
8+
</div>
9+
10+
<div class="demo-track-by-select">
11+
<div class="demo-track-by-label">Track By</div>
12+
<md-radio-group [(ngModel)]="trackByStrategy">
13+
<md-radio-button [value]="'reference'">Reference</md-radio-button>
14+
<md-radio-button [value]="'id'">ID</md-radio-button>
15+
<md-radio-button [value]="'index'">Index</md-radio-button>
16+
</md-radio-group>
17+
</div>
1418
</div>
1519

1620
<div class="demo-table-container mat-elevation-z4">

src/demo-app/data-table/data-table-demo.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@
1212
}
1313
}
1414

15-
.demo-data-source-actions {
15+
.demo-data-source-actions > div {
1616
margin: 16px 0;
1717
}
1818

19+
.demo-track-by-select {
20+
display: flex;
21+
align-items: center;
22+
23+
.demo-track-by-label {
24+
margin-right: 8px;
25+
}
26+
}
27+
1928
/*
2029
* Styles to make the demo's cdk-table match the material design spec
2130
* https://material.io/guidelines/components/data-tables.html

src/demo-app/data-table/people-database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class PeopleDatabase {
2424

2525
initialize() {
2626
LATEST_ID = 0;
27-
this.data = [];
27+
this.dataChange.next([]);
2828
for (let i = 0; i < 100; i++) { this.addPerson(); }
2929
}
3030

0 commit comments

Comments
 (0)