2020-06-27 18:24:21 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntInputComponentBase<string>
|
|
|
|
|
|
2020-08-26 22:37:08 +08:00
|
|
|
|
@using AntDesign.Internal
|
2020-06-27 18:24:21 +08:00
|
|
|
|
|
2020-08-26 22:37:08 +08:00
|
|
|
|
<div @ref="@_divRef" style="@Style" id="@Id">
|
|
|
|
|
<CascadingValue Value='$"ant-select-dropdown"' Name="PrefixCls">
|
|
|
|
|
<OverlayTrigger Style="display: inline"
|
|
|
|
|
Visible="@(ShowPanel && !_isOptionsZero)"
|
|
|
|
|
IsButton="@true"
|
|
|
|
|
Disabled="false"
|
|
|
|
|
Trigger="new TriggerType[] { TriggerType.Click }"
|
2020-09-17 10:37:47 +08:00
|
|
|
|
PopupContainerSelector="@PopupContainerSelector"
|
2020-08-26 22:37:08 +08:00
|
|
|
|
OverlayEnterCls="slide-up-enter slide-up-enter-active slide-up"
|
|
|
|
|
OverlayLeaveCls="slide-up-leave slide-up-leave-active slide-up"
|
|
|
|
|
OverlayClassName="@OverlayClassName"
|
|
|
|
|
OverlayStyle="@OverlayStyle">
|
|
|
|
|
<Overlay>
|
|
|
|
|
<CascadingValue Value="this">
|
|
|
|
|
<div style="max-height: 256px; overflow-y: auto; overflow-anchor: none; @_minWidth">
|
|
|
|
|
<div style="display: flex;flex-direction: column;">
|
|
|
|
|
@if (Options.Value != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var option in GetOptionItems())
|
|
|
|
|
{
|
|
|
|
|
<AutoCompleteOption Value="@option.Value" Label="@option.Label" Disabled="option.IsDisabled">
|
|
|
|
|
@option.Label
|
|
|
|
|
</AutoCompleteOption>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@AutoCompleteOptions
|
|
|
|
|
}
|
2020-06-27 18:24:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-08-26 22:37:08 +08:00
|
|
|
|
</CascadingValue>
|
|
|
|
|
</Overlay>
|
|
|
|
|
<ChildContent>
|
|
|
|
|
<CascadingValue Value="this">
|
|
|
|
|
@if (ChildContent == null)
|
|
|
|
|
{
|
|
|
|
|
<AutoCompleteInput @bind-Value="@CurrentValue" />
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@ChildContent
|
|
|
|
|
}
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
</ChildContent>
|
|
|
|
|
</OverlayTrigger>
|
|
|
|
|
</CascadingValue>
|
2020-07-16 13:00:23 +08:00
|
|
|
|
</div>
|