@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/index.js CHANGED
@@ -5049,18 +5049,22 @@ function FormItemForwarder(_a) {
5049
5049
  });
5050
5050
  return React__default.default.Children.map(formItemProps.children, (child, i) => {
5051
5051
  var _a3;
5052
- let newProps = __spreadProps$6(__spreadValues$d(__spreadValues$d({
5053
- name: formItemProps.name
5054
- }, (_a3 = child.props) != null ? _a3 : {}), props), {
5055
- __plasmicFormField: true
5056
- });
5057
- if (formItemProps.customizeProps) {
5058
- newProps = mergeProps(
5059
- newProps,
5060
- formItemProps.customizeProps(data, newProps)
5061
- );
5052
+ if (i === 0 && React.isValidElement(child)) {
5053
+ let newProps = __spreadProps$6(__spreadValues$d(__spreadValues$d({
5054
+ name: formItemProps.name
5055
+ }, (_a3 = child.props) != null ? _a3 : {}), props), {
5056
+ __plasmicFormField: true
5057
+ });
5058
+ if (formItemProps.customizeProps) {
5059
+ newProps = mergeProps(
5060
+ newProps,
5061
+ formItemProps.customizeProps(data, newProps)
5062
+ );
5063
+ }
5064
+ return React.cloneElement(child, newProps);
5065
+ } else {
5066
+ return child;
5062
5067
  }
5063
- return i === 0 && React.isValidElement(child) ? React.cloneElement(child, newProps) : child;
5064
5068
  });
5065
5069
  }
5066
5070
  function getDefaultValueHint(field) {