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/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.5.0-beta09</Version>
<Version>9.4.10</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Components/TreeView/TreeView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else
@if (IsVirtualize)
{
<div class="tree-root scroll is-virtual" tabindex="0">
<Virtualize ItemSize="RowHeight" OverscanCount="10" Items="@Rows">
<Virtualize ItemSize="RowHeight" OverscanCount="OverscanCount" Items="@Rows">
@RenderRow(context)
</Virtualize>
</div>
Expand Down
13 changes: 10 additions & 3 deletions src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,18 @@ public partial class TreeView<TItem> : IModelEqualityComparer<TItem>
public bool IsVirtualize { get; set; }

/// <summary>
/// Gets or sets the row height for virtual scrolling. Default is 38.
/// Gets or sets the row height for virtual scrolling. Default is 29f.
/// </summary>
/// <remarks>Effective when <see cref="ScrollMode"/> is set to Virtual.</remarks>
/// <remarks>Effective when <see cref="IsVirtualize"/> is set to true.</remarks>
[Parameter]
public float RowHeight { get; set; } = 38f;
public float RowHeight { get; set; } = 29f;

/// <summary>
/// Gets or sets the overscan count for virtual scrolling. Default is 10.
/// </summary>
/// <remarks>Effective when <see cref="IsVirtualize"/> is set to true.</remarks>
[Parameter]
public int OverscanCount { get; set; } = 10;

/// <summary>
/// Gets or sets the toolbar content template. Default is null.
Expand Down
6 changes: 2 additions & 4 deletions test/UnitTest/Components/TimerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,12 @@ public async Task OnCancel_Ok()
var downs = cut.FindAll(".time-spinner-arrow.fa-angle-down");
await cut.InvokeAsync(() => downs[0].Click());
await cut.InvokeAsync(() => cut.Find(".time-panel-btn.confirm").Click());
await Task.Delay(1000);
var buttons = cut.FindAll(".timer-buttons button");

// pause
var buttons = cut.FindAll(".timer-buttons button");
Assert.True(buttons[1].ClassList.Contains("btn-warning"));
Assert.Equal("暂停", buttons[1].GetInnerText());
await cut.InvokeAsync(() => buttons[1].Click());
await Task.Delay(500);

// resume
buttons = cut.FindAll(".timer-buttons button");
Expand All @@ -156,6 +155,5 @@ public async Task OnCancel_Ok()
downs = cut.FindAll(".time-spinner-arrow.fa-angle-down");
await cut.InvokeAsync(() => downs[0].Click());
await cut.InvokeAsync(() => cut.Find(".time-panel-btn.confirm").Click());
await Task.Delay(1000);
}
}