极发无线电输入不响应Bootstrap类
将Bootstrap类添加到Blazor InputRadiogroup
之后,无线电选项不再是交互式。他们在单击时不响应。当我打开表单时,它们将设置为当前值,但不能更改。直到我添加Bootstrap 4.0 custom-control
类后,这才发生。
没有任何课程,无线电按钮可以工作:
<InputRadioGroup
TValue="Guid?"
Value="guidVal"
ValueChanged="e =>
{
guidVal = e;
}"
ValueExpression="() => guidVal">
<div>
<InputRadio Value="GUID_CONST_1" />
<label>First</label>
</div>
<div>
<InputRadio Value="GUID_CONST_2" />
<label>Second</label>
</div>
<div>
<InputRadio Value="GUID_CONST_3" />
<label>Third</label>
</div>
</InputRadioGroup>
当我添加课程时,它们停止响应:
<InputRadioGroup
TValue="Guid?"
Value="guidVal"
ValueChanged="e =>
{
guidVal = e;
}"
ValueExpression="() => guidVal">
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">First</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">Second</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">Third</label>
</div>
</InputRadioGroup>
想知道是什么原因造成的。我在使用控件时看到浏览器控制台中没有错误或VS2022中的调试输出。
After adding bootstrap classes to a Blazor InputRadioGroup
, the radio options are no longer interactive. They to not respond when clicked. When I open the form they are set to the current value but cannot be changed. This did not happen until after I added bootstrap 4.0 custom-control
classes to the elements.
Without any classes, the radio buttons work:
<InputRadioGroup
TValue="Guid?"
Value="guidVal"
ValueChanged="e =>
{
guidVal = e;
}"
ValueExpression="() => guidVal">
<div>
<InputRadio Value="GUID_CONST_1" />
<label>First</label>
</div>
<div>
<InputRadio Value="GUID_CONST_2" />
<label>Second</label>
</div>
<div>
<InputRadio Value="GUID_CONST_3" />
<label>Third</label>
</div>
</InputRadioGroup>
When I add the classes, they stop being responsive:
<InputRadioGroup
TValue="Guid?"
Value="guidVal"
ValueChanged="e =>
{
guidVal = e;
}"
ValueExpression="() => guidVal">
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">First</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">Second</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<InputRadio class="custom-control-input" Value="GUID_CONST_1" />
<label class="custom-control-label">Third</label>
</div>
</InputRadioGroup>
Wondering what is causing this. I see no errors in the browser console or the Debug output in VS2022 when using the controls.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论