Skip to content

Commit 7334ca4

Browse files
committed
refactor: 更新变量名称
1 parent 7af1d0e commit 7334ca4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/BootstrapBlazor/Components/Table/Table.razor

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,12 @@
369369
{
370370
@if (Items != null)
371371
{
372-
<Virtualize @ref="VirtualizeElement"
373-
ItemSize="RowHeight" OverscanCount="10" Items="@Items.ToList()" ChildContent="RenderRow">
372+
<Virtualize ItemSize="RowHeight" OverscanCount="10" Items="@Items.ToList()" ChildContent="RenderRow">
374373
</Virtualize>
375374
}
376375
else
377376
{
378-
<Virtualize @ref="VirtualizeElement"
377+
<Virtualize @ref="_virtualizeElement"
379378
ItemSize="RowHeight" OverscanCount="10" Placeholder="RenderPlaceholderRow"
380379
ItemsProvider="LoadItems" ItemContent="RenderRow">
381380
</Virtualize>

src/BootstrapBlazor/Components/Table/Table.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public partial class Table<TItem> : ITable, IModelEqualityComparer<TItem> where
3838
/// <summary>
3939
/// 获得/设置 内置虚拟化组件实例
4040
/// </summary>
41-
protected Virtualize<TItem>? VirtualizeElement { get; set; }
41+
[NotNull]
42+
private Virtualize<TItem>? _virtualizeElement = null;
4243

4344
/// <summary>
4445
/// 获得 Table 组件样式表

0 commit comments

Comments
 (0)