bug(SelectTree): 设置初始值后无法选中对应项 #4823
Replies: 8 comments 2 replies
-
@tiansfather Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project that illustrates the problem. |
Beta Was this translation helpful? Give feedback.
-
@tiansfather 感谢感谢,我稍后复现,如果是bug 修复一下后发包 |
Beta Was this translation helpful? Give feedback.
-
@tiansfather 不是 BUG 我转成讨论,我再给答案 |
Beta Was this translation helpful? Give feedback.
-
@tiansfather 你的例子我看了。怎么说呢。这都是最最最基本的问题。并不是组件的 bug。可以 B 站关注一下我的视频教程。下面是链接 https://space.bilibili.com/660853738 正确代码有很多种,主要是看你设计。比如 Index.razor
知识点是数据异步加载与组件渲染周期 |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
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();
}
`
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
复现工程.zip
Exceptions (if any)
No response
.NET Version
NET8.0
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions