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

21 lines
705 B
C#
Raw Normal View History

@namespace AntDesign
@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)
{
<Checkbox class="ant-checkbox-group-item"
2020-04-24 18:32:50 +08:00
Disabled="option.Disabled || Disabled"
Checked="@(option.Checked)"
Label="@option.Value"
2020-04-24 18:32:50 +08:00
CheckedChange="_=>OnOptionChange()">
<span>@option.Label</span>
</Checkbox>
2020-04-24 18:32:50 +08:00
}
}
@ChildContent
</div>
</CascadingValue>