Skip to content

Commit c4568cf

Browse files
authored
Gird: Enum filter dropdown - Selection #757 (#805)
1 parent 6dbc8b5 commit c4568cf

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

blazorbootstrap/Components/Grid/GridColumnFilter.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<span class="px-2">@filterValue</span>
6666
}
6767
</DropdownToggleButton>
68-
<DropdownMenu>
68+
<DropdownMenu Class="bb-dropdown-menu-enum" Style="max-height: var(--bb-grid-filter-dropdown-max-height); overflow-x: hidden; overflow-y: auto;">
6969
@if (PropertyType is not null)
7070
{
7171
@foreach (var item in Enum.GetValues(PropertyType!))

blazorbootstrap/wwwroot/blazor.bootstrap.css

+16
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
--bb-table-selected-row-hover-color: #000;
5555
--bb-table-selected-row-background-color: rgba(0,0,0,0.075);
5656
--bb-table-selected-row-hover-background-color: rgba(0,0,0,0.075);
57+
/* enum filter */
58+
--bb-grid-filter-dropdown-max-height: 300px;
5759
/* callout */
5860
--bb-callout-link: 10, 88, 202;
5961
--bb-callout-code-color: #ab296a;
@@ -80,6 +82,20 @@
8082
--bb-sidebar2-nav-item-group-background-color: rgba(var(--bb-sidebar2-nav-item-text-active-color-rgb),0.08);
8183
}
8284

85+
/* grid - enum dropdown */
86+
@media (max-width: 767px) {
87+
.table-responsive .bb-dropdown-menu-enum,
88+
.table-responsive .dropdown-toggle {
89+
position: static !important;
90+
}
91+
}
92+
93+
@media (min-width: 768px) {
94+
.table-responsive:has(.bb-dropdown-menu-enum) {
95+
overflow: visible;
96+
}
97+
}
98+
8399
/* preload */
84100
.modal-page-loading {
85101
z-index: var(--bb-preload-modal-z-index) !important;

0 commit comments

Comments
 (0)