Skip to content

Commit cc22758

Browse files
authored
fix(Checkbox): render UI when click input (#4618)
* refactor(Checkbox): 代码格式化 * fix(Checkbox): 修复点击未刷新问题 * chore: bump version 9.0.0-rc.2.11.6.0
1 parent e35bbdc commit cc22758

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/BootstrapBlazor/BootstrapBlazor.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.0-rc.2.11.5.1</Version>
4+
<Version>9.0.0-rc.2.11.6.0</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ private async Task OnToggleClick()
187187
{
188188
if (!IsDisabled)
189189
{
190-
await InternalStateChanged(State == CheckboxState.Checked ? CheckboxState.UnChecked : CheckboxState.Checked);
190+
var render = await InternalStateChanged(State == CheckboxState.Checked ? CheckboxState.UnChecked : CheckboxState.Checked);
191+
if (render)
192+
{
193+
StateHasChanged();
194+
}
191195
}
192196
}
193197

@@ -201,7 +205,6 @@ private async Task OnToggleClick()
201205
private async Task<bool> InternalStateChanged(CheckboxState state)
202206
{
203207
var ret = true;
204-
205208
_paddingStateChanged = true;
206209

207210
if (IsBoolean)
@@ -223,7 +226,6 @@ private async Task<bool> InternalStateChanged(CheckboxState state)
223226
await OnStateChanged(State, Value);
224227
}
225228
}
226-
227229
return ret;
228230
}
229231

0 commit comments

Comments
 (0)