- {React.cloneElement(children, childProps)}
- {invalid && error && !horizontal && (
+ const childProps = deleteUndefinedProps({ invalid, disabled, loading });
+ return (
+
+ {labelElement}
+
+
{React.cloneElement(children, childProps)}
+ {invalid && error && !horizontal && (
+
+ {error}
+
+ )}
+
+
+ {invalid && error && horizontal && (
@@ -113,19 +128,11 @@ export const Field = ({
)}
+ );
+ }
+);
- {invalid && error && horizontal && (
-
- {error}
-
- )}
-