ant-design-blazor/components/checkbox/AntCheckboxGroup.razor

21 lines
711 B
C#
Raw Normal View History

2020-01-11 01:10:05 +08:00
@namespace AntBlazor
@inherits AntDomComponentBase
2020-01-11 01:10:05 +08:00
<CascadingValue Value="this">
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
2020-04-24 18:32:50 +08:00
@if (Options != null)
{
2020-04-24 18:32:50 +08:00
@foreach (var option in Options)
{
<AntCheckbox class="ant-checkbox-group-item"
Disabled="option.Disabled || Disabled"
Checked="@(option.Checked)"
Value="@option.Value"
CheckedChange="_=>OnOptionChange()">
<span>@option.Label</span>
</AntCheckbox>
}
}
@ChildContent
</div>
</CascadingValue>