Skip to content

Commit 78f2789

Browse files
authored
doc(Select): update ShowSearch sample code (#5241)
* refactor: 调整搜索图标上边距 * doc: 更新示例 * refactor: 移除多余配置 * doc: 更新示例
1 parent 0099bd3 commit 78f2789

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/BootstrapBlazor.Server/Components/Samples/Selects.razor

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,12 @@
383383
<DemoBlock Title="@Localizer["SelectsPopoverTitle"]"
384384
Introduction="@Localizer["SelectsPopoverIntro"]"
385385
Name="Popover">
386-
<div class="row">
387-
<div class="col-12 col-sm-6 overflow-hidden">
388-
<Select TValue="string" Items="Items" IsPopover="true" ShowSearch="true" />
386+
<div class="row g-3 form-inline">
387+
<div class="col-12">
388+
<Switch @bind-Value="_showPopoverSearch" ShowLabel="true" DisplayText="ShowSearch"></Switch>
389+
</div>
390+
<div class="col-12">
391+
<Select TValue="string" Items="Items" IsPopover="true" ShowSearch="_showPopoverSearch" />
389392
</div>
390393
</div>
391394
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public sealed partial class Selects
4343

4444
private bool _showSearch;
4545

46+
private bool _showPopoverSearch = true;
47+
4648
private bool _isShowSearchClearable;
4749

4850
private bool _isClearable;

src/BootstrapBlazor.Server/appsettings.Development.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,5 @@
6969
"ContextMenuOptions": {
7070
"OnTouchDelay": 600
7171
}
72-
},
73-
"SupportedLanguages": [ "zh-CN", "ru-RU" ]
72+
}
7473
}

src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ $bb-select-search-border-color: var(--bs-border-color);
512512
$bb-select-search-padding-right: 30px;
513513
$bb-select-search-icon-color: var(--bb-select-search-border-color);
514514
$bb-select-search-icon-right: 20px;
515-
$bb-select-search-icon-top: 15px;
515+
$bb-select-search-icon-top: 17px;
516516
$bb-select-search-height: 60px;
517517
$bb-select-append-width: 30px;
518518
$bb-select-append-color: #c0c4cc;

0 commit comments

Comments
 (0)