mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-05 13:39:39 +08:00
!2365 fix(#I4SICI): throw exception when Value type is string and not set Items parameter
* chore: bump version to beta09 * fix: 修复CheckboxList 组件 Value 为 string 时报错问题
This commit is contained in:
parent
d25b31ec6d
commit
71ad4212fc
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>6.2.9-beta08</Version>
|
||||
<Version>6.2.9-beta09</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
||||
|
@ -112,7 +112,8 @@ public partial class CheckboxList<TValue>
|
||||
Type? innerType = null;
|
||||
if (typeof(IEnumerable).IsAssignableFrom(typeof(TValue)))
|
||||
{
|
||||
innerType = typeof(TValue).GetGenericArguments()[0];
|
||||
var t = typeof(TValue);
|
||||
innerType = t.IsGenericType ? typeof(TValue).GetGenericArguments()[0] : t;
|
||||
}
|
||||
if (innerType != null && innerType.IsEnum)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user