Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
复现步骤:
- 附件最小Demo,打开Home.razor页面, Demo里测试绑定的泛型数据为 不可为Null的decimal, 在BootstrapInput框里输入 数字 300,然后全选中数字,执行一次性删除,在下面div标签里能看到绑定的decimal值还是300;


Steps:
- Open the Home.razor page with the min demo in the attachment. The data bind-value for evaluation in the demo is a non-nullable decimal.
- Enter the number 300 in the BootstrapInput Components, then select all the numbers and perform a one-time deletion.
- You can see that the bound decimal value is still 300 in the div tag below;
Describe the solution you'd like
-
附件请查收Demo
-
经查阅源代码,是否可以在ValidateBase.cs绑定的泛型CurrentValueAsString里新增对于不可为Null的数字类型进行判断,如果为空值则等于对应类型的默认值,添加如下代码,经测试可行,烦请审阅:

else if (typeof(TValue).IsValueType && Nullable.GetUnderlyingType(typeof(TValue)) == null && string.IsNullOrEmpty(value)) { // Non-nullable value type (e.g., int, double, etc.) PreviousParsingAttemptFailed = false; CurrentValue = default!; }
BootstrapBlazor.Net8.zip
Additional context
No response