Skip to content

Commit 35b2018

Browse files
authored
feat(SelectCity): disable AutoClose when set IsMultiple to true (#612)
* feat: 多选时 AutoClose 参数不生效 * chore: bump version 9.0.5
1 parent 61ca51d commit 35b2018

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/BootstrapBlazor.Region/BootstrapBlazor.Region.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.0.4</Version>
4+
<Version>9.0.5</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/components/BootstrapBlazor.Region/Components/SelectCity.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public partial class SelectCity
3131

3232
/// <summary>
3333
/// 获得/设置 单选时选择后是否自动关闭 默认 true
34+
/// <para><see cref="IsMultiple"/> 值为 true 时,这个参数不生效</para>
3435
/// </summary>
3536
[Parameter]
3637
public bool AutoClose { get; set; } = true;
@@ -144,7 +145,7 @@ private async Task OnSelectCity(string item)
144145
CurrentValue = item;
145146
}
146147

147-
if (AutoClose)
148+
if (!IsMultiple && AutoClose)
148149
{
149150
await InvokeVoidAsync("hide", Id);
150151
}

0 commit comments

Comments
 (0)