@plasmicpkgs/antd5 0.0.131 → 0.0.133

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.
@@ -679,12 +679,12 @@ function registerForm(loader) {
679
679
  ]
680
680
  },
681
681
  validateTrigger: {
682
- displayName: "Validate rules",
682
+ displayName: "Validate when",
683
683
  type: "choice",
684
684
  options: [
685
- { value: "onBlur", label: "When a field loses focus" },
686
- { value: "onChange", label: "When a field changes" },
687
- { value: "onSubmit", label: "When the form is submitted" }
685
+ { value: "onBlur", label: "a field loses focus" },
686
+ { value: "onChange", label: "a field changes" },
687
+ { value: "onSubmit", label: "the form is submitted" }
688
688
  ],
689
689
  multiSelect: true,
690
690
  defaultValueHint: ["onChange"],
@@ -897,7 +897,7 @@ function FormItemWrapper(props) {
897
897
  if (prevPropValues.current.name !== props.name) {
898
898
  forceRemount == null ? void 0 : forceRemount();
899
899
  }
900
- if (!fullFormItemName || get(initialValues, fullFormItemName) != null) {
900
+ if (!fullFormItemName || get(initialValues, fullFormItemName) != null || props.initialValue == null) {
901
901
  return;
902
902
  }
903
903
  form == null ? void 0 : form.setFieldValue(fullFormItemName, props.initialValue);
@@ -906,7 +906,7 @@ function FormItemWrapper(props) {
906
906
  }, [
907
907
  form,
908
908
  props.initialValue,
909
- pathCtx.fullPath,
909
+ JSON.stringify(pathCtx.fullPath),
910
910
  props.name,
911
911
  props.preserve
912
912
  ]);
@@ -1191,9 +1191,15 @@ function commonFormItemProps(usage) {
1191
1191
  defaultValueHint: getDefaultValueHint("hidden")
1192
1192
  },
1193
1193
  validateTrigger: {
1194
+ displayName: "Validate when",
1194
1195
  type: "choice",
1195
- options: ["onSubmit", "onChange", "onBlur"],
1196
+ options: [
1197
+ { value: "onBlur", label: "a field loses focus" },
1198
+ { value: "onChange", label: "a field changes" },
1199
+ { value: "onSubmit", label: "the form is submitted" }
1200
+ ],
1196
1201
  multiSelect: true,
1202
+ defaultValueHint: ["onChange"],
1197
1203
  advanced: true
1198
1204
  },
1199
1205
  shouldUpdate: {
@@ -1533,7 +1539,7 @@ const FormListWrapper = React.forwardRef(function FormListWrapper2(props, ref) {
1533
1539
  prevPropValues.current.initialValue = props.initialValue;
1534
1540
  fireOnValuesChange == null ? void 0 : fireOnValuesChange();
1535
1541
  }
1536
- }, [props.initialValue, fullFormItemName]);
1542
+ }, [JSON.stringify(props.initialValue), JSON.stringify(fullFormItemName)]);
1537
1543
  }
1538
1544
  return /* @__PURE__ */ React.createElement(FormList, __spreadProps(__spreadValues({}, props), { name: relativeFormItemName != null ? relativeFormItemName : [] }), (...args) => {
1539
1545
  operationsRef.current = args;
@@ -1556,6 +1562,7 @@ function registerFormList(loader) {
1556
1562
  parentComponentName: formComponentName,
1557
1563
  displayName: "Form List",
1558
1564
  actions: COMMON_ACTIONS,
1565
+ providesData: true,
1559
1566
  props: {
1560
1567
  children: {
1561
1568
  type: "slot",