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
Field Condition示例中使用useWatch监听了favoriteFruit字段,导致整个form都跟随favoriteFruit在rerender。 antd v5中有dependencies / shouldUpdate可以使某个表单项只依赖部分表单项,可减少render次数以提高性能,但是发现这种方式目前NiceForm并不支持:
Field Condition
useWatch
favoriteFruit
dependencies / shouldUpdate
NiceForm
{ key: 'otherFruit', label: 'Other', dependencies: ['favoriteFruit'], condition: () => NiceForm.getFieldValue('favoriteFruit', meta, form) === 'Other', }
源码中condition逻辑是在FormField中,实际上只会在整个form render 时执行: 可以将condition / render逻辑转移到adapter中的renderField,但这样对 adapter 是 breaking change
condition
FormField
condition / render
adapter
renderField
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Field Condition
示例中使用useWatch
监听了favoriteFruit
字段,导致整个form都跟随favoriteFruit
在rerender。antd v5中有
dependencies / shouldUpdate
可以使某个表单项只依赖部分表单项,可减少render次数以提高性能,但是发现这种方式目前NiceForm
并不支持:源码中
condition
逻辑是在FormField
中,实际上只会在整个form render 时执行:可以将
condition / render
逻辑转移到adapter
中的renderField
,但这样对adapter
是 breaking changeThe text was updated successfully, but these errors were encountered: