-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSelectProvince.razor
More file actions
26 lines (25 loc) · 1.17 KB
/
SelectProvince.razor
File metadata and controls
26 lines (25 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@namespace BootstrapBlazor.Components
@inherits SelectRegionBase
@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.Region/Components/SelectRegion.razor.js")]
@if (IsShowLabel)
{
<BootstrapLabel required="@Required" for="@InputId" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
}
<div @attributes="AdditionalAttributes" id="@Id" class="@ClassString">
<div class="dropdown-toggle" data-bs-toggle="bb.dropdown" data-bs-placement="@PlacementString" data-bs-offset="@OffsetString" data-bs-custom-class="@CustomClassString">
<input type="text" id="@InputId" disabled="@Disabled" readonly placeholder="@PlaceHolder" class="@InputClassString" value="@CurrentValueAsString" />
<span class="@AppendClassString"><i class="@DropdownIcon"></i></span>
</div>
@if (!IsDisabled)
{
<span class="@ClearClassString" @onclick="OnClearValue"><i class="@ClearIcon"></i></span>
}
<div class="dropdown-menu bb-region-body">
<ul>
@foreach (var item in GetProvinces())
{
<li class="@GetActiveClass(item)" @onclick="() => OnSelectProvince(item)">@item</li>
}
</ul>
</div>
</div>