Skip to content

Commit 4d16a6e

Browse files
committed
doc: 更新 IsFixedSearch 示例
1 parent 738acfc commit 4d16a6e

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,21 +316,27 @@
316316
Introduction="@Localizer["SelectsShowSearchIntro"]"
317317
Name="ShowSearch">
318318
<section ignore>
319-
<div class="row mb-3">
319+
<div class="row g-3">
320320
<div class="col-12 col-sm-6">
321321
<BootstrapInputGroup>
322322
<BootstrapInputGroupLabel DisplayText="IsClearable" />
323323
<Checkbox @bind-Value="@_isShowSearchClearable" />
324324
</BootstrapInputGroup>
325325
</div>
326+
<div class="col-12 col-sm-6">
327+
<BootstrapInputGroup>
328+
<BootstrapInputGroupLabel DisplayText="IsFixedSearch" />
329+
<Checkbox @bind-Value="@_isFixedSearch" />
330+
</BootstrapInputGroup>
331+
</div>
326332
</div>
327333
</section>
328-
<div class="row g-3 mt-3">
334+
<div class="row g-3">
329335
<div class="col-12 col-sm-6">
330-
<Select TValue="string" Items="Items" ShowSearch="true" IsClearable="_isShowSearchClearable" />
336+
<Select TValue="string" Items="Items" ShowSearch="true" IsClearable="_isShowSearchClearable" IsFixedSearch="_isFixedSearch" />
331337
</div>
332338
<div class="col-12 col-sm-6">
333-
<Select TValue="string" Items="StringItems" ShowSearch="true" IsClearable="_isShowSearchClearable" />
339+
<Select TValue="string" Items="StringItems" ShowSearch="true" IsClearable="_isShowSearchClearable" IsFixedSearch="_isFixedSearch" />
334340
</div>
335341
</div>
336342
</DemoBlock>

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

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

4848
private bool _isShowSearchClearable;
4949

50+
private bool _isFixedSearch;
51+
5052
private bool _isClearable;
5153

5254
private string? _fooName;

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3154,7 +3154,7 @@
31543154
"SelectsCustomTemplateTitle": "Custom option templates",
31553155
"SelectsCustomTemplateIntro": "By setting the <code>ItemTemplate</code> you can customize the option rendering style",
31563156
"SelectsShowSearchTitle": "Drop-down box with search box",
3157-
"SelectsShowSearchIntro": "Controls whether the search box is displayed by setting the <code>ShowSearch</code> property, which is not displayed by default false",
3157+
"SelectsShowSearchIntro": "Controls whether the search box is displayed by setting the <code>ShowSearch</code> property, which is not displayed by default <b>false</b>. Fixed the search bar by setting <code>IsFixedSearch</code>",
31583158
"SelectsConfirmSelectTitle": "Drop-down box with confirmation",
31593159
"SelectsConfirmSelectIntro": "Block changes to the current value by setting the <code>OnBeforeSelectedItemChange</code> delegate.",
31603160
"SelectsTimeZoneTitle": "Timezone",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3154,7 +3154,7 @@
31543154
"SelectsCustomTemplateTitle": "自定义选项模板",
31553155
"SelectsCustomTemplateIntro": "通过设置 <code>ItemTemplate</code> 可以自定义选项渲染样式",
31563156
"SelectsShowSearchTitle": "带搜索框的下拉框",
3157-
"SelectsShowSearchIntro": "通过设置 <code>ShowSearch</code> 属性控制是否显示搜索框,默认为 false 不显示搜索框",
3157+
"SelectsShowSearchIntro": "通过设置 <code>ShowSearch</code> 属性控制是否显示搜索框,默认为 <b>false</b> 不显示搜索框;通过设置 <code>IsFixedSearch</code> 固定搜索栏",
31583158
"SelectsConfirmSelectTitle": "带确认的下拉框",
31593159
"SelectsConfirmSelectIntro": "通过设置 <code>OnBeforeSelectedItemChange</code> 委托,阻止当前值的改变",
31603160
"SelectsTimeZoneTitle": "时区下拉框",

0 commit comments

Comments
 (0)