[英]Tabbed Form in Ant Design Issue
Tabbed Form doesn't seem possible in AntDesign.在 AntDesign 中,选项卡式表单似乎是不可能的。 all field error comes when we submit form inside tab
当我们在选项卡内提交表单时,所有字段错误都会出现
Blockers阻滞剂
Create forms inside each tab and in your parent file which will hold the tabs data, active tab manage the state.在每个选项卡内和将保存选项卡数据的父文件中创建表单,活动选项卡管理状态。 Create form for each tab.
为每个选项卡创建表单。 Suppose i have name and member tab i will create the form with Const nameForm = useForm() Const memberForm =useForm()
假设我有名称和成员选项卡,我将使用 Const nameForm = useForm() Const memberForm =useForm() 创建表单
And pass each form as props to the component.并将每个表单作为道具传递给组件。 Nameform to name component and so on.
Nameform 来命名组件等等。 And whenever you will try to change the tab or click submit check in function which tab is active and validate that form only.
每当您尝试更改选项卡或单击提交检查功能时,哪个选项卡处于活动状态并仅验证该表单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.