File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/BootstrapBlazor/Components/ListView Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -185,30 +185,31 @@ protected override async Task OnParametersSetAsync()
185185 /// 点击页码调用此方法
186186 /// </summary>
187187 /// <param name="pageIndex"></param>
188- protected Task OnPageLinkClick ( int pageIndex ) => QueryAsync ( pageIndex ) ;
188+ protected Task OnPageLinkClick ( int pageIndex ) => QueryAsync ( pageIndex , true ) ;
189189
190190 /// <summary>
191191 /// 查询按钮调用此方法
192192 /// </summary>
193193 /// <returns></returns>
194- public async Task QueryAsync ( int pageIndex = 1 )
194+ public async Task QueryAsync ( int pageIndex = 1 , bool triggerByPagination = false )
195195 {
196196 _pageIndex = pageIndex ;
197- await QueryData ( ) ;
197+ await QueryData ( triggerByPagination ) ;
198198 StateHasChanged ( ) ;
199199 }
200200
201201 /// <summary>
202202 /// 调用 OnQuery 回调方法获得数据源
203203 /// </summary>
204- protected async Task QueryData ( )
204+ protected async Task QueryData ( bool triggerByPagination = false )
205205 {
206206 QueryData < TItem > ? queryData = null ;
207207 if ( OnQueryAsync != null )
208208 {
209209 queryData = await OnQueryAsync ( new QueryPageOptions ( )
210210 {
211211 IsPage = IsPagination ,
212+ IsTriggerByPagination = triggerByPagination ,
212213 PageIndex = _pageIndex ,
213214 PageItems = PageItems ,
214215 } ) ;
You can’t perform that action at this time.
0 commit comments