簡體   English   中英

如何禁用 InputRadioGroup?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM