Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="9.0.6" />
<PackageReference Include="BootstrapBlazor.Player" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.3" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.4" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.1" />
<PackageReference Include="BootstrapBlazor.SmilesDrawer" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.3" />
Expand Down
4 changes: 2 additions & 2 deletions src/BootstrapBlazor.Server/Components/Samples/OtpInputs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<DemoBlock Title="@Localizer["OtpInputsNormalTitle"]"
Introduction="@Localizer["OtpInputsNormalIntro"]"
Name="Normal">
<div class="row g-3 mb-3">
<section ignore class="row g-3 mb-3">
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="Type"></BootstrapInputGroupLabel>
Expand All @@ -56,7 +56,7 @@
<Switch @bind-Value="@_disabled"></Switch>
</BootstrapInputGroup>
</div>
</div>
</section>
<OtpInput Value="@_value" Type="_otpInputType" PlaceHolder="@_placeHolder" IsReadonly="_readonly" IsDisabled="_disabled"></OtpInput>
</DemoBlock>

Expand Down
34 changes: 27 additions & 7 deletions src/BootstrapBlazor.Server/Components/Samples/SelectCities.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,31 @@
<DemoBlock Title="@Localizer["CityNormalTitle"]"
Introduction="@Localizer["CityNormalIntro"]"
Name="Normal">
<SelectCity Value="@_value"></SelectCity>
</DemoBlock>

<DemoBlock Title="@Localizer["CityMultipleTitle"]"
Introduction="@Localizer["CityMultipleIntro"]"
Name="IsMultiple">
<SelectCity IsMultiple="true" Value="@_multipleValues"></SelectCity>
<div class="row g-3 mb-3">
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="ShowSearch"></BootstrapInputGroupLabel>
<Switch @bind-Value="_showSearch"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="AutoClose"></BootstrapInputGroupLabel>
<Switch @bind-Value="_autoClose"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="IsMultiple"></BootstrapInputGroupLabel>
<Switch @bind-Value="@_isMultiple"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="IsDisabled"></BootstrapInputGroupLabel>
<Switch @bind-Value="@_isDisabled"></Switch>
</BootstrapInputGroup>
</div>
</div>
<SelectCity Value="@_value" ShowSearch="_showSearch" IsMultiple="_isMultiple" IsDisabled="_isDisabled" AutoClose="_autoClose"></SelectCity>
</DemoBlock>
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ public partial class SelectCities
{
private string? _value = null;

private string? _multipleValues = null;
private bool _showSearch = true;

private bool _isMultiple = false;

private bool _isDisabled = false;

private bool _autoClose = true;
}
4 changes: 1 addition & 3 deletions src/BootstrapBlazor.Server/Locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -7234,9 +7234,7 @@
"CityTitle": "City Selector",
"CityDescription": "Provides a city selector classified by province",
"CityNormalTitle": "Basic usage",
"CityNormalIntro": "Select a city from the drop-down box",
"CityMultipleTitle": "Multiple",
"CityMultipleIntro": "Enable multiple selection mode by setting <code>IsMultiple</code> , and all cities will be automatically selected when clicking a province in the pop-up window."
"CityNormalIntro": "Select a city from the drop-down box"
},
"BootstrapBlazor.Server.Components.Samples.SelectProvinces": {
"ProvinceTitle": "Province Selector",
Expand Down
4 changes: 1 addition & 3 deletions src/BootstrapBlazor.Server/Locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -7234,9 +7234,7 @@
"CityTitle": "SelectCity 城市选择器",
"CityDescription": "提供以省分类的城市选择器",
"CityNormalTitle": "基本用法",
"CityNormalIntro": "通过下拉框的形式选择城市",
"CityMultipleTitle": "多选",
"CityMultipleIntro": "通过设置 <code>IsMultiple</code> 开启多选模式,点击弹窗中省份时自动选中所有城市"
"CityNormalIntro": "通过下拉框的形式选择城市"
},
"BootstrapBlazor.Server.Components.Samples.SelectProvinces": {
"ProvinceTitle": "SelectProvince 省选择器",
Expand Down
9 changes: 7 additions & 2 deletions src/BootstrapBlazor/wwwroot/modules/base-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const Popover = {
return isDisabled(el) || isDisabled(el.parentNode) || isDisabled(el.querySelector('.form-control'))
},
initCallback: null,
hideCallback: null
hideCallback: null,
shownCallback: null
},
...(config || {})
}
Expand Down Expand Up @@ -105,7 +106,11 @@ const Popover = {
popover.hasDisplayNone = true;
content.classList.remove("d-none")
}
body.append(content)
body.append(content);

if (popover.shownCallback != null) {
popover.shownCallback();
}
}
}

Expand Down
Loading