ant-design-blazor/components/radio/Radio.razor
James Yeung 7e5e83ee19 fix(module: radio): add defaultChecked and defaultValue (#1494)
* fix(module: radio): add defaultChecked and defaultValue

* add tests

* add test for radio group
2021-05-15 22:59:18 +08:00

21 lines
667 B
C#

@namespace AntDesign
@typeparam TValue
@inherits AntDomComponentBase
<label @onclick="OnClick" @onclick:preventDefault="true" class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
<span class="@_radioClassMapper.Class">
<input type="radio"
autofocus="@AutoFocus"
class="@_inputClassMapper.Class"
disabled="@Disabled"
checked="@IsChecked"
name="@_name"
value="@Value"
@ref="_inputRef" />
<span class="@_innerClassMapper.Class"></span>
</span>
@if (ChildContent != null)
{
<span>@ChildContent</span>
}
</label>