@namespace AntDesign @inherits AntDomComponentBase
@switch (SelectMode) { case SelectMode.Default: { var selectedOption = SelectedOptions.FirstOrDefault();
@if (ShowPlaceholder) { @Placeholder } else if (string.IsNullOrEmpty(_searchValue) && selectedOption != null) { var showValue = GetShowValue(selectedOption); @if (showValue.IsT0) { @showValue.AsT0 } else { @showValue.AsT1 } }
break; } default: {
@foreach (var option in SelectedOptions) { if (TagRender != null) { @TagRender(GetProperties(option)) } else { var showValue = GetShowValue(option); @if (showValue.IsT0) { @showValue.AsT0 } else { @showValue.AsT1 } } } @if (ShowPlaceholder) { @Placeholder }
break; } } @if (ShowArrow && SelectMode == SelectMode.Default) { if (SuffixIcon != null) { } else if (Loading) { } else { @if (AllowClear && HasValue) { } } }
@if (IsEmptyOnSearch()) {
@if (NotFoundContent != null) { @NotFoundContent } else { }
} else {
@for (var i = 0; SelectOptions.Count > i; ++i) { var selectOption = SelectOptions[i];
@selectOption.Value
}
@if (IsCreatedTagOption()) { @_searchValue } @ChildContent @if (Options != null && Options.Any()) { foreach (var option in Options) { @option.Label } } @if (IsTagMode) { var tagOptions = new SortedSet(_tagSelectOptions.Select(option => option.Value).Union(_tokenSelectOptions)); @foreach (var tag in tagOptions) { @tag } }
if (DropdownRender != null) { @DropdownRender(default, default); } }