Skip to content

Commit 62d4dde

Browse files
[~] Sticky header for tables in modals CactuseSecurity#2993
1 parent 5fee52a commit 62d4dde

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

roles/ui/files/FWO.UI/Pages/NetworkModelling/ShowHistory.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</Authorized>
2424
</AuthorizeView>
2525
<PageSizeComponent PageSizeCallback="UpdatePageSize"></PageSizeComponent>
26-
<Table PageSize="PageSize" class="table table-bordered th-bg-secondary table-responsive" TableItem="ModellingHistoryEntry" Items="history">
26+
<Table PageSize="PageSize" class="table table-bordered th-bg-secondary table-responsive sticky-header" TableItem="ModellingHistoryEntry" Items="history">
2727
<Column TableItem="ModellingHistoryEntry" Title="@(userConfig.GetText("application"))" Field="@(x => x.AppId)" Sortable="true" Filterable="true">
2828
<Template>
2929
@(Applications.FirstOrDefault(x => x.Id == context.AppId)?.Name ?? context.AppId.ToString())

roles/ui/files/FWO.UI/Shared/PopUp.razor.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
.custom-modal-xl {
1111
max-width: 80vw;
1212
margin-top: 3em;
13+
--bs-custom-modal-margin-top: -3em;
1314
margin-left: auto;
1415
margin-right: auto;
1516
}
@@ -21,6 +22,7 @@
2122
.custom-modal-lg {
2223
max-width: 60vw;
2324
margin-top: 8em;
25+
--bs-custom-modal-margin-top: -8em;
2426
margin-left: auto;
2527
margin-right: auto;
2628
}
@@ -32,6 +34,7 @@
3234
.custom-modal-md {
3335
max-width: 40vw;
3436
margin-top: 12em;
37+
--bs-custom-modal-margin-top: -12em;
3538
margin-left: auto;
3639
margin-right: auto;
3740
}
@@ -43,6 +46,7 @@
4346
.custom-modal-sm {
4447
max-width: 30vw;
4548
margin-top: 16em;
49+
--bs-custom-modal-margin-top: -16em;
4650
margin-left: auto;
4751
margin-right: auto;
4852
}
@@ -54,6 +58,7 @@
5458
.custom-modal-xs {
5559
max-width: 30vw;
5660
margin-top: 16em;
61+
--bs-custom-modal-margin-top: -16em;
5762
margin-left: auto;
5863
margin-right: auto;
5964
}
@@ -78,5 +83,5 @@
7883
padding: 2em 2em 0 2em;
7984
background-color: rgba(255, 255, 255, 1);
8085
overflow-y: auto;
81-
/*overflow-x: hidden;*/
86+
/*overflow-x: hidden;*/
8287
}

roles/ui/files/FWO.UI/wwwroot/css/site.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,4 +546,12 @@ div.modal-body > div.table-responsive {
546546

547547
div.modal-body > * > div.table-responsive {
548548
overflow-x: inherit;
549+
}
550+
551+
div.modal-body > div.table-responsive > table.sticky-header thead {
552+
top: var(--bs-custom-modal-margin-top);
553+
}
554+
555+
div.modal-body > div.m-2 > div.table-responsive > table.sticky-header thead {
556+
top: calc(var(--bs-custom-modal-margin-top) + .5rem);
549557
}

0 commit comments

Comments
 (0)