Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.6.5-beta02</Version>
<Version>9.6.5-beta03</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
28 changes: 15 additions & 13 deletions src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
@if (IsVirtualize)
{
<div class="dropdown-virtual">
<div class="dropdown-menu-body dropdown-virtual">
Copy link

Copilot AI May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider updating the component’s documentation or README to note that dropdown content is now wrapped in a dropdown-menu-body class for both virtualized and non-virtualized modes.

Copilot uses AI. Check for mistakes.
@if (OnQueryAsync == null)
{
<Virtualize ItemSize="RowHeight" OverscanCount="OverscanCount" Items="@GetVirtualItems()" ChildContent="RenderRow" />
Expand All @@ -58,24 +58,26 @@
}
else
{
@foreach (var itemGroup in Rows.GroupBy(i => i.GroupName))
{
if (!string.IsNullOrEmpty(itemGroup.Key))
<div class="dropdown-menu-body">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): GroupBy is executed on every render in markup

Move the grouping logic to a computed property or backing field to avoid repeated execution and improve performance with large data sets.

@foreach (var itemGroup in Rows.GroupBy(i => i.GroupName))
{
if (GroupItemTemplate != null)
if (!string.IsNullOrEmpty(itemGroup.Key))
{
@GroupItemTemplate(itemGroup.Key)
if (GroupItemTemplate != null)
{
@GroupItemTemplate(itemGroup.Key)
}
else
{
<Divider Text="@itemGroup.Key" />
}
}
else
@foreach (var item in itemGroup)
{
<Divider Text="@itemGroup.Key" />
@RenderRow(item)
}
}
@foreach (var item in itemGroup)
{
@RenderRow(item)
}
}
</div>
}
</div>
@if (!IsPopover)
Expand Down