Skip to content

Commit 613fdf0

Browse files
AdminAdmin
authored andcommitted
获取或设置当SelectTree 节点处于禁用状态时,节点是否可以展开或折叠。默认值为 false。
1 parent 16731b9 commit 613fdf0

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/BootstrapBlazor/Components/Select/SelectTree.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<TreeView TItem="TValue" Items="@Items" ShowIcon="ShowIcon"
2424
OnTreeItemClick="OnItemClick" ModelEqualityComparer="@ModelEqualityComparer"
2525
ShowSearch="ShowSearch" ShowResetSearchButton="ShowResetSearchButton"
26+
CanExpandWhenDisabled="CanExpandWhenDisabled"
2627
CustomKeyAttribute="@CustomKeyAttribute" OnExpandNodeAsync="@OnExpandNodeAsync" />
2728
</div>
2829
@if (!IsPopover)

src/BootstrapBlazor/Components/Select/SelectTree.razor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ public partial class SelectTree<TValue> : IModelEqualityComparer<TValue>
5151
[Parameter]
5252
public string? PlaceHolder { get; set; }
5353

54+
/// <summary>
55+
/// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false.
56+
/// </summary>
57+
[Parameter]
58+
public bool CanExpandWhenDisabled { get; set; } = false;
59+
5460
/// <summary>
5561
/// 获得/设置 字符串比较规则 默认 StringComparison.OrdinalIgnoreCase 大小写不敏感
5662
/// </summary>

0 commit comments

Comments
 (0)