mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
41077bc2fb
* select-rewritten select-rewritten * modul: select - update 1 * select-update2 * select-update3 * select-update 4 * feat: append label tag & auto tokenization * fix: conflict in drpdown demo Co-authored-by: Lars Diederich <diederich@evodata.de> Co-authored-by: ElderJames <shunjiey@hotmail.com>
32 lines
938 B
C#
32 lines
938 B
C#
@namespace AntDesign.Select.Internal
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItemValue
|
|
@typeparam TItem
|
|
|
|
@{
|
|
RenderFragment<SelectOptionItem<TItemValue, TItem>> selectOptionFragment = (model) =>
|
|
@<SelectOption
|
|
@key="@model.InternalId"
|
|
TItemValue="TItemValue"
|
|
TItem="TItem">
|
|
</SelectOption>;
|
|
}
|
|
|
|
@foreach (var selectOption in SelectParent.SortedSelectOptionItems)
|
|
{
|
|
if (_oldGroupName == selectOption.GroupName)
|
|
{
|
|
<CascadingValue Value="@selectOption.InternalId" Name="InternalId">
|
|
@selectOptionFragment(selectOption)
|
|
</CascadingValue>
|
|
}
|
|
else
|
|
{
|
|
<div class="@ClassMapper.Class">@selectOption.GroupName</div>
|
|
<CascadingValue Value="@selectOption.InternalId" Name="InternalId">
|
|
@selectOptionFragment(selectOption)
|
|
</CascadingValue>
|
|
|
|
_oldGroupName = selectOption.GroupName;
|
|
}
|
|
} |