@plasmicpkgs/antd5 0.0.178 → 0.0.179

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/antd.esm.js CHANGED
@@ -5032,18 +5032,22 @@ function FormItemForwarder(_a) {
5032
5032
  });
5033
5033
  return React.Children.map(formItemProps.children, (child, i) => {
5034
5034
  var _a3;
5035
- let newProps = __spreadProps$6(__spreadValues$d(__spreadValues$d({
5036
- name: formItemProps.name
5037
- }, (_a3 = child.props) != null ? _a3 : {}), props), {
5038
- __plasmicFormField: true
5039
- });
5040
- if (formItemProps.customizeProps) {
5041
- newProps = mergeProps(
5042
- newProps,
5043
- formItemProps.customizeProps(data, newProps)
5044
- );
5035
+ if (i === 0 && isValidElement(child)) {
5036
+ let newProps = __spreadProps$6(__spreadValues$d(__spreadValues$d({
5037
+ name: formItemProps.name
5038
+ }, (_a3 = child.props) != null ? _a3 : {}), props), {
5039
+ __plasmicFormField: true
5040
+ });
5041
+ if (formItemProps.customizeProps) {
5042
+ newProps = mergeProps(
5043
+ newProps,
5044
+ formItemProps.customizeProps(data, newProps)
5045
+ );
5046
+ }
5047
+ return cloneElement(child, newProps);
5048
+ } else {
5049
+ return child;
5045
5050
  }
5046
- return i === 0 && isValidElement(child) ? cloneElement(child, newProps) : child;
5047
5051
  });
5048
5052
  }
5049
5053
  function getDefaultValueHint(field) {