mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
ea061850ec
* fix(module:select): multiple select & tags & tokenization fix performance optimizations add PrefixIcon keep focus on selected item * fix(module:select): on clear button make first active * docs(module:select): reflect changes
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
@using AntDesign.Select.Internal
|
|
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItemValue
|
|
@typeparam TItem
|
|
<div @ref="Ref"
|
|
@key="@this"
|
|
class="@ClassMapper.Class"
|
|
role="option"
|
|
aria-selected="@IsSelected"
|
|
style="@InnerStyle"
|
|
@onclick="@OnClick"
|
|
@onmouseenter="@OnMouseEnter">
|
|
<div class="@ClassPrefix-content">
|
|
@if (ItemTemplate != null)
|
|
{
|
|
@ItemTemplate(Model.Item)
|
|
}
|
|
else
|
|
{
|
|
@InternalLabel
|
|
}
|
|
</div>
|
|
@switch (SelectParent.SelectMode)
|
|
{
|
|
case SelectMode.Default:
|
|
<span class="@ClassPrefix-state" unselectable="on" aria-hidden="true" style="user-select: none;"></span>
|
|
break;
|
|
default:
|
|
if (IsSelected)
|
|
{
|
|
<span unselectable="on" aria-hidden="true" style="user-select: none;" class="@ClassPrefix-state">
|
|
<Icon Type="check"></Icon>
|
|
</span>
|
|
}
|
|
break;
|
|
}
|
|
</div> |