Skip to content

Commit

Permalink
add IsReset to SelectTree
Browse files Browse the repository at this point in the history
  • Loading branch information
卢骥 committed Dec 17, 2024
1 parent d86c077 commit ecc0ba6
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
@@ -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)
{
6 changes: 6 additions & 0 deletions src/BootstrapBlazor/Components/Select/SelectTree.razor.cs
Original file line number Diff line number Diff line change
@@ -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; }

0 comments on commit ecc0ba6

Please sign in to comment.