-
-
Notifications
You must be signed in to change notification settings - Fork 364
Closed
Labels
bugSomething isn't workingSomething isn't workingquestionQuestion that needs to be answeredQuestion that needs to be answered
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
与https://github.com/dotnetcore/BootstrapBlazor/issues/988相同,但最新版本9.1.3仍然复现
Expected Behavior
`
@page "/"
@Attribute [TabItemOption(Text = "Index", Closable = false)]
<SelectTree Items="BindItems" Value="@("文件一")">
@code{
private List<TreeViewItem>? BindItems { get; set; } = new List<TreeViewItem>();
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
//没有下面这行就能显示选中值
await Task.Yield();
LoadData();
}
private void LoadData()
{
BindItems =
[
new TreeViewItem<string>("目录一")
{
Text ="目录一",
Icon = "fa-solid fa-folder",
ExpandIcon = "fa-solid fa-folder-open",
Items =
[
new TreeViewItem<string>("子目录一")
{
Text ="子目录一",
Icon = "fa-solid fa-folder",
ExpandIcon = "fa-solid fa-folder-open",
Items =
[
new TreeViewItem<string>("文件一") { Text = "文件一", Icon = "fa-solid fa-file" },
new TreeViewItem<string>("文件二") { Text = "文件二", Icon = "fa-solid fa-file" }
]
}
]
}
];
}
}
`
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
Exceptions (if any)
No response
.NET Version
NET8.0
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingquestionQuestion that needs to be answeredQuestion that needs to be answered
