From 7f82876f5cb02abc29fbe195788dab0ad33013c5 Mon Sep 17 00:00:00 2001 From: Alex chow Date: Sat, 11 Jan 2025 13:04:22 +0100 Subject: [PATCH] fix(Table): use request.Count parameter on virtualize mode (#5089) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复搜索条件变化导致获取分页数字不准确 * chore: bump version 9.2.7-beta05 Co-Authored-By: Zeus <166673003+A5196060@users.noreply.github.com> Co-Authored-By: Alex chow * chore: bump version 9.2.7-beta06 * refactor: 虚拟滚动模式下直接使用 request.Count 即可 * chore: bump version 9.2.7-beta06 Co-Authored-By: Alex chow * chore: bump version 9.2.7-beta03 Co-Authored-By: Alex chow --------- Co-authored-by: Argo Zhang Co-authored-by: Zeus <166673003+A5196060@users.noreply.github.com> --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- src/BootstrapBlazor/Components/Table/Table.razor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 3dbb728cb92..ed6980a6efb 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 9.2.7-beta05 + 9.2.7-beta03 diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index f42078188da..8c3d057e850 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -1387,7 +1387,7 @@ void SetEditTemplate() private async ValueTask> LoadItems(ItemsProviderRequest request) { StartIndex = _isFilterTrigger ? 0 : request.StartIndex; - _pageItems = TotalCount > 0 ? Math.Min(request.Count, TotalCount - request.StartIndex) : request.Count; + _pageItems = request.Count; await QueryData(); return new ItemsProviderResult(QueryItems, TotalCount); }