@@ -10,84 +10,90 @@ <h2>{{course?.description}}</h2>
10
10
11
11
</ div >
12
12
13
- < table mat-table class ="lessons-table mat-elevation-z8 "
14
- matSort matSortDisableClear matSortActive ="seqNo " matSortDirection ="asc "
15
- [dataSource] ="lessons " multiTemplateDataRows >
13
+ < div class ="scrolling-container ">
16
14
17
- < ng-container matColumnDef ="select ">
15
+ < table mat-table class ="lessons-table mat-elevation-z8 "
16
+ matSort matSortDisableClear matSortActive ="seqNo " matSortDirection ="asc "
17
+ [dataSource] ="lessons " multiTemplateDataRows >
18
18
19
- < th mat-header-cell *matHeaderCellDef >
19
+ < ng-container matColumnDef =" select " sticky >
20
20
21
- < mat-checkbox [checked] ="selection.hasValue() && isAllSelected() "
22
- [indeterminate] ="selection.hasValue() && !isAllSelected() "
21
+ < th mat-header-cell *matHeaderCellDef >
23
22
24
- (change) ="toggleAll() ">
23
+ < mat-checkbox [checked] ="selection.hasValue() && isAllSelected() "
24
+ [indeterminate] ="selection.hasValue() && !isAllSelected() "
25
25
26
+ (change) ="toggleAll() ">
26
27
27
- </ mat-checkbox >
28
28
29
+ </ mat-checkbox >
29
30
30
- </ th >
31
31
32
- < td mat-cell *matCellDef =" let lesson " (click) =" $event.stopPropagation() " >
32
+ </ th >
33
33
34
- < mat-checkbox (change) ="onLessonToggled(lesson) "
35
- [checked] ="selection.isSelected(lesson) ">
34
+ < td mat-cell *matCellDef ="let lesson " (click) ="$event.stopPropagation() ">
36
35
37
- </ mat-checkbox >
36
+ < mat-checkbox (change) ="onLessonToggled(lesson) "
37
+ [checked] ="selection.isSelected(lesson) ">
38
38
39
+ </ mat-checkbox >
39
40
40
- </ td >
41
41
42
- </ ng-container >
42
+ </ td >
43
43
44
- < ng-container matColumnDef =" seqNo " >
44
+ </ ng-container >
45
45
46
- < th mat-header-cell *matHeaderCellDef mat-sort-header > # </ th >
46
+ < ng-container matColumnDef =" seqNo " sticky >
47
47
48
- < td mat-cell *matCellDef =" let lesson " > {{lesson.seqNo}} </ td >
48
+ < th mat-header- cell *matHeaderCellDef mat-sort-header > # </ th >
49
49
50
- </ ng-container >
50
+ < td mat-cell *matCellDef =" let lesson " > {{lesson.seqNo}} </ td >
51
51
52
- < ng-container matColumnDef =" description " >
52
+ </ ng-container >
53
53
54
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Description </ th >
54
+ < ng-container matColumnDef =" description " >
55
55
56
- < td mat-cell *matCellDef =" let lesson " > {{lesson.description}} </ td >
56
+ < th mat-header- cell *matHeaderCellDef mat-sort-header > Description </ th >
57
57
58
- </ ng-container >
58
+ < td mat-cell *matCellDef =" let lesson " > {{lesson.description}} </ td >
59
59
60
- < ng-container matColumnDef =" duration " >
60
+ </ ng-container >
61
61
62
- < th mat-header-cell *matHeaderCellDef > Duration </ th >
62
+ < ng-container matColumnDef =" duration " >
63
63
64
- < td class =" duration-cell " mat-cell *matCellDef =" let lesson " > {{lesson.duration}} </ td >
64
+ < th mat-header- cell *matHeaderCellDef > Duration </ th >
65
65
66
- </ ng-container >
66
+ < td class =" duration-cell " mat-cell *matCellDef =" let lesson " > {{lesson.duration}} </ td >
67
67
68
- < ng-container matColumnDef =" expandedDetail " >
68
+ </ ng-container >
69
69
70
- < td mat-cell *matCellDef ="let lesson " colspan ="4 ">
71
- {{lesson.longDescription}}
72
- </ td >
70
+ < ng-container matColumnDef ="expandedDetail ">
73
71
74
- </ ng-container >
72
+ < td mat-cell *matCellDef ="let lesson " colspan ="4 ">
73
+ {{lesson.longDescription}}
74
+ </ td >
75
75
76
- < tr mat-header-row *matHeaderRowDef =" displayedColumns " > </ tr >
76
+ </ ng-container >
77
77
78
- < tr mat-row
79
- (click) ="onToggleLesson(lesson) "
80
- *matRowDef ="let lesson;columns:displayedColumns ">
78
+ < tr mat-header-row *matHeaderRowDef ="displayedColumns; sticky:true ">
81
79
82
- </ tr >
80
+ </ tr >
83
81
84
- < tr mat-row *matRowDef ="let lesson;columns:['expandedDetail'] "
85
- [class.collapsed-detail] ="lesson != expandedLesson ">
82
+ < tr mat-row
83
+ (click) ="onToggleLesson(lesson) "
84
+ *matRowDef ="let lesson;columns:displayedColumns ">
86
85
87
- </ tr >
86
+ </ tr >
88
87
88
+ < tr mat-row *matRowDef ="let lesson;columns:['expandedDetail'] "
89
+ [class.collapsed-detail] ="lesson != expandedLesson ">
89
90
90
- </ table >
91
+ </ tr >
92
+
93
+
94
+ </ table >
95
+
96
+ </ div >
91
97
92
98
< mat-paginator class ="mat-elevation-z8 "
93
99
[length] ="course?.lessonsCount "
0 commit comments