Skip to content

Commit

Permalink
feat(SelectTree): add IsReset parameter (#4863)
Browse files Browse the repository at this point in the history
Co-authored-by: 卢骥 <1429614920@qq.com>
Co-authored-by: Argo Zhang <argo@live.ca>
  • Loading branch information
3 people authored Dec 17, 2024
1 parent 6068e0e commit a704298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Components/Select/SelectTree.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<span class="@AppendClassName"><i class="@DropdownIcon"></i></span>
</div>
<div class="dropdown-menu">
<TreeView TItem="TValue" Items="@Items" ShowIcon="ShowIcon" OnTreeItemClick="OnItemClick" ModelEqualityComparer="@ModelEqualityComparer" CustomKeyAttribute="@CustomKeyAttribute" OnExpandNodeAsync="@OnExpandNodeAsync" />
<TreeView TItem="TValue" Items="@Items" IsReset="IsReset" ShowIcon="ShowIcon" OnTreeItemClick="OnItemClick" ModelEqualityComparer="@ModelEqualityComparer" CustomKeyAttribute="@CustomKeyAttribute" OnExpandNodeAsync="@OnExpandNodeAsync" />
</div>
@if (!IsPopover)
{
Expand Down
6 changes: 6 additions & 0 deletions src/BootstrapBlazor/Components/Select/SelectTree.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ public partial class SelectTree<TValue> : IModelEqualityComparer<TValue>
[Parameter]
public bool IsEditable { get; set; }

/// <summary>
/// 获得/设置 页面刷新是否重置已加载数据 默认 false
/// </summary>
[Parameter]
public bool IsReset { get; set; }

[Inject]
[NotNull]
private IStringLocalizer<SelectTree<TValue>>? Localizer { get; set; }
Expand Down

0 comments on commit a704298

Please sign in to comment.