Skip to content

Commit

Permalink
fix(Switch): missing await keyword on OnValueChanged callback (#700)
Browse files Browse the repository at this point in the history
* fix: add await keyword on OnValueChanged

* chore: bump version 7.4.3-beta07
  • Loading branch information
ArgoZhang authored Mar 14, 2023
1 parent ea15e5f commit 0cb85cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>7.4.3-beta06</Version>
<Version>7.4.3-beta07</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
Expand Down
5 changes: 4 additions & 1 deletion src/BootstrapBlazor/Components/Switch/Switch.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ private async Task OnClick()
}

// 回调 OnValueChanged 再调用 EventCallback
OnValueChanged?.Invoke(Value);
if (OnValueChanged != null)
{
await OnValueChanged(Value);
}
}
}
}

0 comments on commit 0cb85cf

Please sign in to comment.