Skip to content

Commit

Permalink
Merge pull request #730 from bkd-mba-fbi/bug/728-sticky-header-test-t…
Browse files Browse the repository at this point in the history
…able-display-none

scroll-test-table tbody #728
  • Loading branch information
schefbi authored Aug 29, 2024
2 parents fe13077 + c47b0e4 commit 4ccbbf2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</th>
</tr>
<tr>
<th class="sticky student-name" (click)="state.sortBy('FullName')">
<th class="student-name" (click)="state.sortBy('FullName')">
<div class="d-flex">
<div class="column-title">
{{ "tests.student.name" | translate }}
Expand All @@ -54,7 +54,7 @@
</div>
</th>
<th
class="sticky student-grade desktop"
class="student-grade desktop"
(click)="state.sortBy('FinalGrade')"
[ngClass]="{ selected: selectedTest === undefined }"
>
Expand All @@ -68,7 +68,7 @@
</div>
</th>
<th
class="border-end sticky student-average desktop"
class="border-end student-average desktop"
(click)="state.sortBy('TestsMean')"
>
<div class="d-flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
--test-columns-offset: calc(
var(--student-average-column-offset) + var(--student-average-column-width)
);
#stickyHeader {
display: none;
}
.scroll-test-table {
display: table-caption;
overflow-y: scroll;
height: 80vh;
}
}

$student-name-width-breakpoint: 1000px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,31 @@
[stickyHeader]="stickyHeader"
>
<thead
style="display: block"
bkdTestEditGradesHeader
[selectedTest]="selectedTest"
(publish)="publish($event)"
(unpublish)="unpublish($event)"
#inlineHeader
></thead>
<thead
id="stickyHeader"
bkdTestEditGradesHeader
[sticky]="true"
[selectedTest]="selectedTest"
(publish)="publish($event)"
(unpublish)="unpublish($event)"
#stickyHeader
></thead>
<tbody>
<tbody class="scroll-test-table">
<tr
*ngFor="
let studentGrade of data.studentGrades;
let studentGradeIndex = index;
trackBy: trackStudentGrade
"
>
<td class="sticky student-name">
<td class="student-name">
<a [routerLink]="['student', studentGrade.student.Id, 'grades']">
<div>{{ studentGrade.student.FullName }}</div>
<div class="student-average-inline">
Expand All @@ -45,7 +47,7 @@
</a>
</td>
<td
class="sticky student-grade"
class="student-grade"
[ngClass]="{ selected: selectedTest === undefined }"
>
<bkd-grade-select
Expand Down

0 comments on commit 4ccbbf2

Please sign in to comment.