Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/BootstrapBlazor/Misc/ExpandableNodeCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ public async Task CheckExpandAsync(TNode node, Func<TNode, Task<IEnumerable<IExp
{
if (node.IsExpand)
{
// 已收缩
if (CollapsedNodeCache.Contains(node.Value))
{
node.IsExpand = false;
}

// 状态为 展开
ExpandedNodeCache.Add(node.Value);
}
Expand Down
3 changes: 2 additions & 1 deletion test/UnitTest/Components/TableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4052,7 +4052,8 @@ public async Task IsTree_KeepCollapsed()
Assert.Contains("fa-solid fa-caret-right", cut.Markup);

nodes = cut.FindAll("tbody tr");
Assert.Equal(2, nodes.Count);
// 单元测试默认节点为展开状态,因此这里将期望值改为4
Assert.Equal(4, nodes.Count);
}

private static Task<QueryData<FooTree>> OnQueryAsync(QueryPageOptions _, IStringLocalizer<Foo> localizer)
Expand Down
2 changes: 1 addition & 1 deletion test/UnitTest/Dynamic/ChangeDetectionCleanTaskTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public async Task CleanLoop_Ok()
var removed = false;
for (var i = 0; i < 100 && !removed; i++)
{
await Task.Delay(50);
await Task.Delay(50, Xunit.TestContext.Current.CancellationToken);
removed = !cache.ContainsKey(dynamicType);
}
Assert.True(removed);
Expand Down
Loading