@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/antd5",
3
- "version": "0.0.178",
3
+ "version": "0.0.179",
4
4
  "description": "Plasmic registration calls for antd components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -108,5 +108,5 @@
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
111
- "gitHead": "84f8787a09fb118ecb011b37bcc313454a741355"
111
+ "gitHead": "af0a8e1a8b9652bda988f8839c620da63f0c0760"
112
112
  }
@@ -1012,18 +1012,22 @@ function FormItemForwarder(_a) {
1012
1012
  });
1013
1013
  return React__default.default.Children.map(formItemProps.children, (child, i) => {
1014
1014
  var _a3;
1015
- let newProps = __spreadProps(__spreadValues(__spreadValues({
1016
- name: formItemProps.name
1017
- }, (_a3 = child.props) != null ? _a3 : {}), props), {
1018
- __plasmicFormField: true
1019
- });
1020
- if (formItemProps.customizeProps) {
1021
- newProps = reactUtils.mergeProps(
1022
- newProps,
1023
- formItemProps.customizeProps(data, newProps)
1024
- );
1015
+ if (i === 0 && React.isValidElement(child)) {
1016
+ let newProps = __spreadProps(__spreadValues(__spreadValues({
1017
+ name: formItemProps.name
1018
+ }, (_a3 = child.props) != null ? _a3 : {}), props), {
1019
+ __plasmicFormField: true
1020
+ });
1021
+ if (formItemProps.customizeProps) {
1022
+ newProps = reactUtils.mergeProps(
1023
+ newProps,
1024
+ formItemProps.customizeProps(data, newProps)
1025
+ );
1026
+ }
1027
+ return React.cloneElement(child, newProps);
1028
+ } else {
1029
+ return child;
1025
1030
  }
1026
- return i === 0 && React.isValidElement(child) ? React.cloneElement(child, newProps) : child;
1027
1031
  });
1028
1032
  }
1029
1033
  function getDefaultValueHint(field) {