scrollToFirstError wrapForm.scrollToField is not a function
xyy7260 opened this issue · 3 comments
xyy7260 commented
1.依赖仓库的版本(Dependencies versions):
"antd": "^5.6.4",
"form-render": "2.3.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
2.问题描述(Bug description):
当我点击提交时候没有滚动到必填的地方
在表单属性中使用scrollToFirstError 报错 wrapForm.scrollToField is not a function
3.出现问题的 schema demo(Reproduction schema demo):
在codesandbox中
4.最小复现 demo(Reproduction demo):
lhbxs commented
XRender 的 form 虽然底层继承了 Antd 。但是 XRender 有 path 的概念和 Antd filed.name 所有不同。所以为了 防止 API 混用,所以在 API 上有自己独立的一套。
lhbxs commented
https://xrender.fun/form-render/api-props ,看下这个 通过 scrollToPath
xyy7260 commented