File tree Expand file tree Collapse file tree
src/BootstrapBlazor/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -387,13 +387,6 @@ private async ValueTask<ItemsProviderResult<SelectedItem>> LoadItems(ItemsProvid
387387 int GetCountByTotal ( ) => TotalCount == 0 ? request . Count : Math . Min ( request . Count , TotalCount - request . StartIndex ) ;
388388 }
389389
390- private async Task SearchTextChanged ( string val )
391- {
392- _itemsCache = null ;
393- SearchText = val ;
394- await RefreshVirtualizeElement ( ) ;
395- }
396-
397390 private async Task RefreshVirtualizeElement ( )
398391 {
399392 if ( IsVirtualize && OnQueryAsync != null )
@@ -463,7 +456,9 @@ public async Task ConfirmSelectedItem(int index)
463456 [ JSInvokable ]
464457 public async Task TriggerOnSearch ( string searchText )
465458 {
466- await SearchTextChanged ( searchText ) ;
459+ _itemsCache = null ;
460+ SearchText = searchText ;
461+ await RefreshVirtualizeElement ( ) ;
467462 StateHasChanged ( ) ;
468463 }
469464
Original file line number Diff line number Diff line change @@ -375,13 +375,6 @@ private async ValueTask<ItemsProviderResult<SelectedItem<TValue>>> LoadItems(Ite
375375 int GetCountByTotal ( ) => TotalCount == 0 ? request . Count : Math . Min ( request . Count , TotalCount - request . StartIndex ) ;
376376 }
377377
378- private async Task SearchTextChanged ( string val )
379- {
380- SearchText = val ;
381- _itemsCache = null ;
382- await RefreshVirtualizeElement ( ) ;
383- }
384-
385378 private async Task RefreshVirtualizeElement ( )
386379 {
387380 if ( IsVirtualize && OnQueryAsync != null )
@@ -420,7 +413,9 @@ public async Task ConfirmSelectedItem(int index)
420413 [ JSInvokable ]
421414 public async Task TriggerOnSearch ( string searchText )
422415 {
423- await SearchTextChanged ( searchText ) ;
416+ _itemsCache = null ;
417+ SearchText = searchText ;
418+ await RefreshVirtualizeElement ( ) ;
424419 StateHasChanged ( ) ;
425420 }
426421
You can’t perform that action at this time.
0 commit comments