File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/BootstrapBlazor/Components/Table Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 369369 {
370370 @if (Items != null )
371371 {
372- < Virtualize ItemSize = " RowHeight" OverscanCount = " 10 " Items = " @Items.ToList()" ChildContent = " RenderRow" >
372+ < Virtualize ItemSize = " RowHeight" OverscanCount = " @OverscanCount " Items = " @Items.ToList()" ChildContent = " RenderRow" >
373373 < / Virtualize >
374374 }
375375 else
376376 {
377377 < Virtualize @ref = " _virtualizeElement"
378- ItemSize = " RowHeight" OverscanCount = " 10 " Placeholder = " RenderPlaceholderRow"
378+ ItemSize = " RowHeight" OverscanCount = " @OverscanCount " Placeholder = " RenderPlaceholderRow"
379379 ItemsProvider = " LoadItems" ItemContent = " RenderRow" >
380380 < / Virtualize >
381381 }
Original file line number Diff line number Diff line change @@ -370,6 +370,13 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName(
370370 [ Parameter ]
371371 public float RowHeight { get ; set ; } = 38f ;
372372
373+ /// <summary>
374+ /// Gets or sets the overscan count for virtual scrolling. Default is 10.
375+ /// </summary>
376+ /// <remarks>Effective when <see cref="ScrollMode"/> is set to <see cref="ScrollMode.Virtual"/>.</remarks>
377+ [ Parameter ]
378+ public int OverscanCount { get ; set ; } = 10 ;
379+
373380 [ Inject ]
374381 [ NotNull ]
375382 private IOptionsMonitor < BootstrapBlazorOptions > ? Options { get ; set ; }
You can’t perform that action at this time.
0 commit comments