Skip to content

Commit 4656052

Browse files
committed
test: 更新单元测试
1 parent 57609e3 commit 4656052

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/UnitTest/Components/TableTest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8911,9 +8911,10 @@ public async Task TestLoopQueryAsync()
89118911

89128912
public RenderFragment RenderVirtualPlaceHolder() => new(builder =>
89138913
{
8914-
if (ScrollMode == ScrollMode.Virtual && VirtualizeElement != null)
8914+
var fieldInfo = GetType().BaseType!.GetField("_virtualizeElement", BindingFlags.NonPublic | BindingFlags.Instance)!;
8915+
if (ScrollMode == ScrollMode.Virtual && fieldInfo.GetValue(this) is Virtualize<Foo> element)
89158916
{
8916-
builder.AddContent(0, VirtualizeElement.Placeholder?.Invoke(new Microsoft.AspNetCore.Components.Web.Virtualization.PlaceholderContext()));
8917+
builder.AddContent(0, element.Placeholder?.Invoke(new PlaceholderContext()));
89178918
}
89188919
});
89198920

0 commit comments

Comments
 (0)