Skip to content

Commit 557107b

Browse files
authored
fix(SelectTable): validate component shoud be skip validate in search panel (#4580)
* fix(Table): 增加缺失的 SkipValidate 设置 * fix: 增加搜索面板下取消验证逻辑 * fix: 更新单元测试 * chore: bump version 8.11.1-beta03
1 parent 40bea27 commit 557107b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>8.11.1-beta02</Version>
4+
<Version>8.11.1-beta03</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Table/Table.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@
995995
}
996996
else
997997
{
998-
<BootstrapInput class="table-toolbar-search" placeholder="@SearchPlaceholderText" @onkeyup="OnSearchKeyUp" @bind-Value="@SearchText">
998+
<BootstrapInput class="table-toolbar-search" placeholder="@SearchPlaceholderText" @onkeyup="OnSearchKeyUp" @bind-Value="@SearchText" SkipValidate="true">
999999
</BootstrapInput>
10001000
}
10011001
}

src/BootstrapBlazor/Utils/Utility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co
537537
// 设置 SkipValidate 参数
538538
if (IsValidComponent(componentType))
539539
{
540-
builder.AddAttribute(160, nameof(IEditorItem.SkipValidate), item.SkipValidate);
540+
builder.AddAttribute(160, nameof(IEditorItem.SkipValidate), isSearch || item.SkipValidate);
541541
}
542542

543543
builder.AddMultipleAttributes(170, CreateMultipleAttributes(fieldType, model, fieldName, item));

test/UnitTest/Components/DateTimePickerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ public async Task AutoClose_OK()
929929
pb.Add(a => a.AutoClose, true);
930930
});
931931
await cut.InvokeAsync(() => button.Click());
932-
Assert.Equal(val, DateTime.Today.AddMonths(-1));
932+
Assert.Equal(val, DateTime.MinValue);
933933
}
934934

935935
[Fact]

0 commit comments

Comments
 (0)