From d7f2a1e9b3a54a689b32cf11345193736c5b8ea8 Mon Sep 17 00:00:00 2001 From: capdiem Date: Wed, 21 Aug 2024 10:37:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=95=20feat(InfiniteScroll):=20add=20th?= =?UTF-8?q?e=20ResetStatus=20public=20method=20(#2110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/InfiniteScroll/MInfiniteScroll.razor.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Masa.Blazor/Components/InfiniteScroll/MInfiniteScroll.razor.cs b/src/Masa.Blazor/Components/InfiniteScroll/MInfiniteScroll.razor.cs index c0e0aadec1..2624c8699f 100644 --- a/src/Masa.Blazor/Components/InfiniteScroll/MInfiniteScroll.razor.cs +++ b/src/Masa.Blazor/Components/InfiniteScroll/MInfiniteScroll.razor.cs @@ -133,6 +133,16 @@ private void ManualChangeCallback(bool val) [MasaApiPublicMethod] public async Task ResetAsync() => await DoLoadMore(); + /// + /// Reset internal status to + /// + [MasaApiPublicMethod] + public void ResetStatus() + { + _loadStatus = InfiniteScrollLoadStatus.Ok; + StateHasChanged(); + } + private void AddScrollListener() { if (!_firstRendered || _isAttached || string.IsNullOrWhiteSpace(Parent)) return;