Skip to content

Commit 31cb69e

Browse files
committed
refactor(TreeView): use Task instead of ValueTask
1 parent deaccd5 commit 31cb69e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ public async ValueTask TriggerKeyDown(string key)
433433
/// <param name="items"></param>
434434
/// <returns></returns>
435435
[JSInvokable]
436-
public ValueTask<List<CheckboxState>> GetParentsState(List<int> items)
436+
public Task<List<CheckboxState>> GetParentsState(List<int> items)
437437
{
438438
var rows = Rows;
439439
var result = items.Select(i =>
@@ -447,7 +447,7 @@ public ValueTask<List<CheckboxState>> GetParentsState(List<int> items)
447447
item.CheckedState = checkedState;
448448
return checkedState;
449449
}).ToList();
450-
return ValueTask.FromResult(result);
450+
return Task.FromResult(result);
451451
}
452452

453453
private static bool IsExpand(TreeViewItem<TItem> item) => item.IsExpand && item.Items.Count > 0;

0 commit comments

Comments
 (0)