Skip to content

Commit c2a7708

Browse files
authored
doc(IsFixedSearch): remove IsFixedSearch documentation (#5666)
* refactor: 移除不使用的命名空间 * refactor: 微调搜索图标位置 * doc: 增加虚拟化参数文档 * doc: 增加参数注释文档 * refactor: 增加样式 * doc: 移除 IsFixedSearch 相关文档
1 parent eee7114 commit c2a7708

File tree

13 files changed

+29
-25
lines changed

13 files changed

+29
-25
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,14 @@ private AttributeItem[] GetAttributes() =>
474474
Type = "bool",
475475
ValueList = "true|false",
476476
DefaultValue = "false"
477+
},
478+
new()
479+
{
480+
Name = nameof(MultiSelect<string>.IsVirtualize),
481+
Description = Localizer["MultiSelectsAttribute_IsVirtualize"],
482+
Type = "bool",
483+
ValueList = "true|false",
484+
DefaultValue = "false"
477485
}
478486
];
479487
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@ private AttributeItem[] GetAttributes() =>
415415
Type = "bool",
416416
ValueList = "true|false",
417417
DefaultValue = "false"
418+
},
419+
new()
420+
{
421+
Name = nameof(Select<string>.IsVirtualize),
422+
Description = Localizer["SelectsIsVirtualize"],
423+
Type = "bool",
424+
ValueList = "true|false",
425+
DefaultValue = "false"
418426
}
419427
];
420428
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@
160160
<TreeView Items="@SearchItems1" ShowSearch="true" OnSearchAsync="@OnSearchAsync"></TreeView>
161161
</DemoBlock>
162162

163-
<DemoBlock Title="@Localizer["TreeViewFixedSearchTitle"]"
164-
Introduction="@Localizer["TreeViewFixedSearchIntro"]"
165-
Name="IsFixedSearch">
166-
<TreeView Items="@SearchItems2" ShowSearch="true" OnSearchAsync="@OnSearchAsync" IsFixedSearch="true" style="height: 180px;"></TreeView>
167-
</DemoBlock>
168-
169163
<DemoBlock Title="@Localizer["TreeViewMaxSelectedCountTitle"]"
170164
Introduction="@Localizer["TreeViewMaxSelectedCountIntro"]"
171165
Name="MaxSelectedCount">

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,6 @@
694694
"TreeViewShowSkeletonButtonText": "Asynchronous loading",
695695
"TreeViewShowSearchTitle": "Show search",
696696
"TreeViewShowSearchIntro": "By setting <code>ShowSearch</code> to display the search bar, and using the <code>OnSearchAsync</code> callback method to set the data source to refresh the page",
697-
"TreeViewFixedSearchTitle": "Fixed search",
698-
"TreeViewFixedSearchIntro": "The search bar can be fixed by setting <code>IsFixedSearch=\"true\"</code>, and the search bar height can be set by the css variable <code>--bb-tree-search-height</code>",
699697
"TreeViewSetActiveTitle": "Set Active Node",
700698
"TreeViewSetActiveIntro": "Set the currently active node by calling the <code>SetActiveItem</code> method",
701699
"TreeViewSetActiveDisplayText": "Current Active Node",
@@ -3164,7 +3162,7 @@
31643162
"SelectsCustomTemplateTitle": "Custom option templates",
31653163
"SelectsCustomTemplateIntro": "By setting the <code>ItemTemplate</code> you can customize the option rendering style",
31663164
"SelectsShowSearchTitle": "Drop-down box with search box",
3167-
"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>",
3165+
"SelectsShowSearchIntro": "Controls whether the search box is displayed by setting the <code>ShowSearch</code> property, which is not displayed by default <b>false</b>",
31683166
"SelectsConfirmSelectTitle": "Drop-down box with confirmation",
31693167
"SelectsConfirmSelectIntro": "Block changes to the current value by setting the <code>OnBeforeSelectedItemChange</code> delegate.",
31703168
"SelectsTimeZoneTitle": "Timezone",
@@ -3204,7 +3202,8 @@
32043202
"SelectsGenericDesc": "<p>Please refer to <a href=\"https://github.com/dotnetcore/BootstrapBlazor/issues/4497?wt.mc_id=DT-MVP-5004174\" target=\"_blank\">Design Ideas</a> to understand this feature. In this example, by selecting the drop-down box option, the value obtained is the <code>Foo</code> instance, and the value displayed in the text box on the right is the <code>Address</code> value of the <code>Foo</code> attribute</p><p>In this example, the <code>ValueEqualityComparer</code> and <code>CustomKeyAttribute</code> parameters are not set, and the <code>[Key]</code> tag of the <code>Id</code> attribute of <code>Foo</code> is used for equality judgment</p>",
32053203
"SelectsOnInputChangedCallback": "Callback method for converting input text into corresponding Value in edit mode",
32063204
"TextConvertToValueCallback": "Callback method when input text changes in edit mode",
3207-
"SelectsIsEditable": "Whether editable"
3205+
"SelectsIsEditable": "Whether editable",
3206+
"SelectsIsVirtualize": "Wether to enable virtualize"
32083207
},
32093208
"BootstrapBlazor.Server.Components.Samples.Sliders": {
32103209
"SlidersTitle": "Slider",

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,6 @@
694694
"TreeViewShowSkeletonButtonText": "异步加载",
695695
"TreeViewShowSearchTitle": "显示搜索栏",
696696
"TreeViewShowSearchIntro": "通过设置 <code>ShowSearch</code> 显示搜索栏,通过 <code>OnSearchAsync</code> 回调方法设置数据源刷新页面即可",
697-
"TreeViewFixedSearchTitle": "固定搜索栏",
698-
"TreeViewFixedSearchIntro": "通过设置 <code>IsFixedSearch=\"true\"</code> 固定搜索栏,可通过样式变量 <code>--bb-tree-search-height</code> 设定搜索栏高度",
699697
"TreeViewSetActiveTitle": "设置激活节点",
700698
"TreeViewSetActiveIntro": "通过调用 <code>SetActiveItem</code> 方法设置当前激活节点",
701699
"TreeViewSetActiveDisplayText": "当前激活节点",
@@ -3164,7 +3162,7 @@
31643162
"SelectsCustomTemplateTitle": "自定义选项模板",
31653163
"SelectsCustomTemplateIntro": "通过设置 <code>ItemTemplate</code> 可以自定义选项渲染样式",
31663164
"SelectsShowSearchTitle": "带搜索框的下拉框",
3167-
"SelectsShowSearchIntro": "通过设置 <code>ShowSearch</code> 属性控制是否显示搜索框,默认为 <b>false</b> 不显示搜索框;通过设置 <code>IsFixedSearch</code> 固定搜索栏",
3165+
"SelectsShowSearchIntro": "通过设置 <code>ShowSearch</code> 属性控制是否显示搜索框,默认为 <b>false</b> 不显示搜索框",
31683166
"SelectsConfirmSelectTitle": "带确认的下拉框",
31693167
"SelectsConfirmSelectIntro": "通过设置 <code>OnBeforeSelectedItemChange</code> 委托,阻止当前值的改变",
31703168
"SelectsTimeZoneTitle": "时区下拉框",
@@ -3204,7 +3202,8 @@
32043202
"SelectsGenericDesc": "<p>请参考 <a href=\"https://github.com/dotnetcore/BootstrapBlazor/issues/4497?wt.mc_id=DT-MVP-5004174\" target=\"_blank\">设计思路</a> 理解此功能。本例中通过选择下拉框选项,得到的值为 <code>Foo</code> 实例,右侧文本框内显示值为 <code>Foo</code> 属性 <code>Address</code> 值</p><p>本例中未设置 <code>ValueEqualityComparer</code> 以及 <code>CustomKeyAttribute</code> 参数,使用 <code>Foo</code> 属性 <code>Id</code> 的 <code>[Key]</code> 标签进行相等判定</p>",
32053203
"SelectsOnInputChangedCallback": "编辑模式下输入文本转换为对应 Value 回调方法",
32063204
"TextConvertToValueCallback": "编辑模式下输入文本变化时回调方法",
3207-
"SelectsIsEditable": "是否可编辑"
3205+
"SelectsIsEditable": "是否可编辑",
3206+
"SelectsIsVirtualize": "是否开启虚拟滚动"
32083207
},
32093208
"BootstrapBlazor.Server.Components.Samples.Sliders": {
32103209
"SlidersTitle": "Slider 滑块",

src/BootstrapBlazor/Components/Filters/LookupFilter.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
{
66
if (IsHeaderRow)
77
{
8-
<Select Items="@Items" StringComparison="LookupStringComparison" @bind-Value="@Value" OnSelectedItemChanged="_ => OnFilterValueChanged()" IsPopover="true" ShowSearch="IsShowSearch" IsFixedSearch="IsFixedSearch"></Select>
8+
<Select Items="@Items" StringComparison="LookupStringComparison" @bind-Value="@Value" OnSelectedItemChanged="_ => OnFilterValueChanged()" IsPopover="true" ShowSearch="IsShowSearch"></Select>
99
}
1010
else
1111
{
12-
<Select Items="@Items" StringComparison="LookupStringComparison" @bind-Value="@Value" ShowSearch="IsShowSearch" IsFixedSearch="IsFixedSearch" ></Select>
12+
<Select Items="@Items" StringComparison="LookupStringComparison" @bind-Value="@Value" ShowSearch="IsShowSearch"></Select>
1313
}
1414
}

src/BootstrapBlazor/Components/Select/Select.razor.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@
121121
transform: rotate(0);
122122
}
123123

124-
.select {
124+
.select,
125+
.auto-complete {
125126
.clear-icon {
126127
position: absolute;
127128
height: 100%;

src/BootstrapBlazor/Components/Select/SelectBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected override void OnParametersSet()
204204
private bool IsNullable() => !ValueType.IsValueType || NullableUnderlyingType != null;
205205

206206
/// <summary>
207-
///
207+
/// Gets whether show the clear button.
208208
/// </summary>
209209
/// <returns></returns>
210210
protected bool GetClearable() => IsClearable && !IsDisabled && IsNullable();

src/BootstrapBlazor/Components/Select/SelectTree.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<TreeView TItem="TValue" Items="@Items" ShowIcon="ShowIcon"
2424
OnTreeItemClick="OnItemClick" ModelEqualityComparer="@ModelEqualityComparer"
2525
ShowSearch="ShowSearch" ShowResetSearchButton="ShowResetSearchButton"
26-
IsFixedSearch="IsFixedSearch"
2726
CustomKeyAttribute="@CustomKeyAttribute" OnExpandNodeAsync="@OnExpandNodeAsync" />
2827
</div>
2928
@if (!IsPopover)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ $bb-select-search-margin-bottom: .5rem;
519519
$bb-select-search-border-color: var(--bs-border-color);
520520
$bb-select-search-padding-right: 30px;
521521
$bb-select-search-icon-color: var(--bb-select-search-border-color);
522-
$bb-select-search-icon-right: 20px;
523-
$bb-select-search-icon-top: 17px;
522+
$bb-select-search-icon-right: 26px;
523+
$bb-select-search-icon-top: 19px;
524524
$bb-select-search-height: 52px;
525525
$bb-select-append-width: 30px;
526526
$bb-select-append-color: #c0c4cc;

0 commit comments

Comments
 (0)