-
Is there an existing issue for this?
Describe the bug双向绑定时报错,不双向绑定是正常的。抛的异常:
ValidateBase.cs 的 IsRequired() 方法报的错。 我的使用场景是自定义一个Table 的编辑菜单,因为有个下拉框内容比较多,想利用SelectTable 的分页特性,所以在自定义的Table 编辑模板中使用了 SeletTable 。 但是Table 的编辑模板似乎会让 SeletTable 走 ValidateForm 的逻辑,但是我又没有 ValidateForm 中的 Model。 Expected BehaviorTable 组件中,在自定义 EditTemplate 中可以正常使用 SelectTable Interactive render modeInteractive Server (Interactive server-side rendering (interactive SSR) using Blazor Server) Steps To Reproduce1、创建一个 Table Exceptions (if any)No response .NET VersionNET9.0 Anything else? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
@yc-2503 Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project that illustrates the problem. |
Beta Was this translation helpful? Give feedback.
-
@yc-2503 请按要求提供复现工程 |
Beta Was this translation helpful? Give feedback.
-
问题主要出现在这里 ![]() ![]() |
Beta Was this translation helpful? Give feedback.
-
复现工程已经提供 |
Beta Was this translation helpful? Give feedback.
-
@yc-2503 增加
编辑模板是内置到表单中的,支持验证的组件就要走验证逻辑,SelectTable 你绑定的是页面私有字段,这是不对的,如需要验证请绑定模型 |
Beta Was this translation helpful? Give feedback.
@yc-2503 增加
SkipValidate
参数即可编辑模板是内置到表单中的,支持验证的组件就要走验证逻辑,SelectTable 你绑定的是页面私有字段,这是不对的,如需要验证请绑定模型
Model
的属性,如果不需要验证增加SkipValidate
参数