![](/img/trans.png)
[英]How to set focus for InputRadio / InputRadioGroup in Blazor?
[英]How to disable InputRadioGroup?
有沒有辦法在 blazor webassembly 中禁用 InputRadioGroup?
我嘗試<InputRadioGroup Disabled="false">
,但這顯然不起作用。 還有別的辦法嗎?
將<InputRadioGroup>
包裝在<fieldset>
中並禁用它。
<fieldset disabled="@true">
<InputRadioGroup @bind-Value="answer">
@foreach (var option in Question.Options)
{
<label class="me-3 form-check-label">
<InputRadio class="form-check-input me-1" Value="@option" />
@option
</label>
}
</InputRadioGroup>
</fieldset>
<InputRadioGroup>
不 output 任何 HTML。它僅輸出 CascadingValue CascadingValue<InputRadioContext>
及其 ChildContent。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.