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>10.2.3-beta03</Version>
<Version>10.2.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,13 @@ private List<SelectedItem> GetItemsByVirtualize()

private async ValueTask<ItemsProviderResult<SelectedItem>> LoadItems(ItemsProviderRequest request)
{
var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal();
var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText });
var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = request.Count, SearchText = SearchText });

_itemsCache = null;
_totalCount = data.TotalCount;
var items = data.Items ?? [];
_result = new ItemsProviderResult<SelectedItem>(items, _totalCount);
return _result;

int GetCountByTotal() => _totalCount == 0 ? request.Count : Math.Min(request.Count, _totalCount - request.StartIndex);
}

/// <summary>
Expand Down
5 changes: 1 addition & 4 deletions src/BootstrapBlazor/Components/Select/Select.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,13 @@ protected override async Task OnParametersSetAsync()

private async ValueTask<ItemsProviderResult<SelectedItem>> LoadItems(ItemsProviderRequest request)
{
var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal();
var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText });
var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = request.Count, SearchText = SearchText });
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

The same conditional count logic that was removed here still exists in SelectGeneric.razor.cs (line 318) and MultiSelectGeneric.razor.cs (line 348). If this fix resolves the placeholder issue in Select and MultiSelect, the same fix should be applied to SelectGeneric and MultiSelectGeneric components for consistency and to prevent the same bug from occurring there.

Copilot uses AI. Check for mistakes.

_itemsCache = null;
_totalCount = data.TotalCount;
var items = data.Items ?? [];
_result = new ItemsProviderResult<SelectedItem>(items, _totalCount);
return _result;

int GetCountByTotal() => _totalCount == 0 ? request.Count : Math.Min(request.Count, _totalCount - request.StartIndex);
}

/// <summary>
Expand Down
Loading