mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: fix FormItem hooks render error (#22053)
This commit is contained in:
parent
122b2185db
commit
f21b4684c8
@ -227,14 +227,14 @@ function FormItem(props: FormItemProps): React.ReactElement {
|
||||
|
||||
const isRenderProps = typeof children === 'function';
|
||||
|
||||
if (!hasName && !isRenderProps && !dependencies) {
|
||||
return renderLayout(children);
|
||||
}
|
||||
|
||||
// Record for real component render
|
||||
const updateRef = React.useRef(0);
|
||||
updateRef.current += 1;
|
||||
|
||||
if (!hasName && !isRenderProps && !dependencies) {
|
||||
return renderLayout(children);
|
||||
}
|
||||
|
||||
return (
|
||||
<Field
|
||||
{...props}
|
||||
|
Loading…
Reference in New Issue
Block a user