File tree Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 2
2
< button md-raised-button (click) ="connect() "> Connect New Data Source</ button >
3
3
< button md-raised-button (click) ="disconnect() " [disabled] ="!dataSource "> Disconnect Data Source</ button >
4
4
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 >
14
18
</ div >
15
19
16
20
< div class ="demo-table-container mat-elevation-z4 ">
Original file line number Diff line number Diff line change 12
12
}
13
13
}
14
14
15
- .demo-data-source-actions {
15
+ .demo-data-source-actions > div {
16
16
margin : 16px 0 ;
17
17
}
18
18
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
+
19
28
/*
20
29
* Styles to make the demo's cdk-table match the material design spec
21
30
* https://material.io/guidelines/components/data-tables.html
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export class PeopleDatabase {
24
24
25
25
initialize ( ) {
26
26
LATEST_ID = 0 ;
27
- this . data = [ ] ;
27
+ this . dataChange . next ( [ ] ) ;
28
28
for ( let i = 0 ; i < 100 ; i ++ ) { this . addPerson ( ) ; }
29
29
}
30
30
You can’t perform that action at this time.
0 commit comments