Skip to content

Commit d19e6f1

Browse files
committed
refactor: 增加滚动行为参数
1 parent 66cd8f7 commit d19e6f1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
<BootstrapLabel required="@Required" for="@InputId" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
1010
}
11-
<div @attributes="AdditionalAttributes" id="@Id" class="@ClassString">
11+
<div @attributes="AdditionalAttributes" id="@Id" class="@ClassString" data-bb-scroll-behavior="@ScrollIntoViewBehaviorString">
1212
<CascadingValue Value="this" IsFixed="true">
1313
@Options
1414
</CascadingValue>

src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ public partial class SelectGeneric<TValue> : ISelectGeneric<TValue>, IModelEqual
261261
.AddClass(SearchLoadingIcon)
262262
.Build();
263263

264+
private string? ScrollIntoViewBehaviorString => ScrollIntoViewBehavior == ScrollIntoViewBehavior.Smooth ? null : ScrollIntoViewBehavior.ToDescriptionString();
265+
264266
/// <summary>
265267
/// 当前选择项实例
266268
/// </summary>

0 commit comments

Comments
 (0)