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

[Bug Report] FormItem中想自定义一个受控的表单组件,直接以children的形式包裹在FormItem中,组件内接收不到value和onChange。函数式的才可以()=>{return <ControlledComponent />} #889

Open
Jinkeee opened this issue Feb 12, 2025 · 0 comments

Comments

@Jinkeee
Copy link

Jinkeee commented Feb 12, 2025

问题出在哪个包

@taroify/core

问题出在哪个平台/设备/浏览器

百度小程序

平台/设备/浏览器

No response

你正在使用的 Taroify 版本是多少

0.1.0

描述一下您遇到的问题以及重现步骤

<Form.Item
name="shop_stype"
defaultValue={2}
label="label"
required
>
// 1.直接引组件,内部无法接收到value和onChange
;
// 2.函数式内部可以接收到value和onChange
{props => {
return <ControlledRadioGroup {...props} />;
}}
</Form.Item>

如果可能的话,请包含一个代码框的链接与复制的问题

No response

你知道如何解决这个问题吗

None

您是否愿意参与修复这个问题,并创建一个 PR

None

修复这个问题的解决方案

No response

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

No branches or pull requests

1 participant