We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
react
https://stackblitz.com/edit/react-fbswqt?file=src%2Fdemo.jsx
No response
"react": "^18.2.0",
The text was updated successfully, but these errors were encountered:
👋 @CassenChan,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
如果自己另外管理状态的话,可以给 FormItem 拓展一个 unMount 属性,实现表单显示与状态管理保持同样的逻辑,表单联动逻辑多的时候,比 react-hook-form 的 unregister 稍微简单点。
{isShowLink && ( <FormItem label="链接" unMount={() => { setFieldValue(Fields.link, undefined); }} > <div> <Input placeholder="请输入链接" value={fields.link} onChange={(value) => { setFieldValue(Fields.link, value); }} /> </div> </FormItem> )}
这样能避免表单元素销毁后,旧的表单值还残存
No branches or pull requests
tdesign-react 版本
react
重现链接
https://stackblitz.com/edit/react-fbswqt?file=src%2Fdemo.jsx
重现步骤
期望结果
No response
实际结果
No response
框架版本
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
The text was updated successfully, but these errors were encountered: