Skip to content
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

表单中使用自定义封装的 Picker 组件时,无法通过表单API 校验 和 赋值 #6614

Open
ImpTyrion opened this issue Apr 28, 2024 · 0 comments
Labels

Comments

@ImpTyrion
Copy link
Contributor

Version of antd-mobile

5.35.0

What is this feature about?

本自定义封装目的,是为了在本组件不用写 useEffect 去请求接口数据,再塞值给 columns,而是直接通过配置实现
问题: 套了一层自定义组件后,表单的校验、赋值无法正常使用
看了文档是通过实例 ref 透传 到Picker,于是我自定义时 也传了 ref (不传不行),校验时不传 onConfirm 也不行
赋值 我不知道怎么解决了,尝试用了 value ,但是不行
希望解答,谢谢!
事例:https://stackblitz.com/edit/react-jqkhlt-knkmss?file=demo.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant