fix(SelectTable): validate component shoud be skip validate in search panel (#4580)

* fix(Table): 增加缺失的 SkipValidate 设置

* fix: 增加搜索面板下取消验证逻辑

* fix: 更新单元测试

* chore: bump version 8.11.1-beta03
This commit is contained in:
Argo Zhang 2024-10-31 20:14:20 +08:00 committed by GitHub
parent 40bea27bf1
commit 557107b96f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>8.11.1-beta02</Version>
<Version>8.11.1-beta03</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -995,7 +995,7 @@
}
else
{
<BootstrapInput class="table-toolbar-search" placeholder="@SearchPlaceholderText" @onkeyup="OnSearchKeyUp" @bind-Value="@SearchText">
<BootstrapInput class="table-toolbar-search" placeholder="@SearchPlaceholderText" @onkeyup="OnSearchKeyUp" @bind-Value="@SearchText" SkipValidate="true">
</BootstrapInput>
}
}

View File

@ -537,7 +537,7 @@ public static class Utility
// 设置 SkipValidate 参数
if (IsValidComponent(componentType))
{
builder.AddAttribute(160, nameof(IEditorItem.SkipValidate), item.SkipValidate);
builder.AddAttribute(160, nameof(IEditorItem.SkipValidate), isSearch || item.SkipValidate);
}
builder.AddMultipleAttributes(170, CreateMultipleAttributes(fieldType, model, fieldName, item));

View File

@ -929,7 +929,7 @@ public class DateTimePickerTest : BootstrapBlazorTestBase
pb.Add(a => a.AutoClose, true);
});
await cut.InvokeAsync(() => button.Click());
Assert.Equal(val, DateTime.Today.AddMonths(-1));
Assert.Equal(val, DateTime.MinValue);
}
[Fact]