New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Form组件期望新增错误时自动滚到错误项目的功能 #5680
Labels
Comments
后续会支持 |
chenjiahan
added a commit
that referenced
this issue
Feb 20, 2020
chenjiahan
added a commit
that referenced
this issue
Feb 20, 2020
已在 2.5.2 版本支持 自动 focus 暂无计划支持,可以按目前的套路使用 |
十分感谢 |
scrollToField 第二个参数传false,不能滚动到底部 |
有技术支持群吗?有问题大家可以讨论 |
好像不起作用,反倒是默认滚动到底部了 |
@chenjiahan 是不是可以换个思路,放在中间位置是不是好一点? |
@841440416 我试下没问题 @Xiamer 暂时没计划支持呢,这里用的是原生的 scrollIntoView API |
我也遇到这个问题,默认滚动到头部,被navbar(fixed)导航栏挡住了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个功能解决了什么问题
当form表单项目过多,超出屏幕范围的项目输入错误时,用户不能感知到出现了什么错误,影响体验
描述您想要的解决方案
提交错误时自动滚到错误项目,输入组件直接focus
建议的API是什么样的
目前我的做法是:
调用第一个报错项目的focus方法
Field组件自带focus方法,直接调用即可
其他的例如radio等,新增一个隐藏的input
<input ref="hide" type="text" style="position: absolute;opacity: 0;" readonly="readonly">
The text was updated successfully, but these errors were encountered: