@rjsf/core 5.23.0 → 5.23.2

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/core.umd.js CHANGED
@@ -894,7 +894,7 @@
894
894
  const newOption = intOption >= 0 ? retrievedOptions[intOption] : void 0;
895
895
  const oldOption = selectedOption >= 0 ? retrievedOptions[selectedOption] : void 0;
896
896
  let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);
897
- if (newFormData && newOption) {
897
+ if (newOption) {
898
898
  newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, "excludeObjectChildren");
899
899
  }
900
900
  this.setState({ selectedOption: intOption }, () => {
@@ -1059,13 +1059,13 @@
1059
1059
  const { StringField: StringField2 } = registry.fields;
1060
1060
  let value = formData;
1061
1061
  const handleChange = react.useCallback(
1062
- (value2) => {
1062
+ (value2, errorSchema, id) => {
1063
1063
  setLastValue(value2);
1064
1064
  if (`${value2}`.charAt(0) === ".") {
1065
1065
  value2 = `0${value2}`;
1066
1066
  }
1067
1067
  const processed = typeof value2 === "string" && value2.match(trailingCharMatcherWithPrefix) ? utils.asNumber(value2.replace(trailingCharMatcher, "")) : utils.asNumber(value2);
1068
- onChange(processed);
1068
+ onChange(processed, errorSchema, id);
1069
1069
  },
1070
1070
  [onChange]
1071
1071
  );
package/dist/index.esm.js CHANGED
@@ -962,7 +962,7 @@ var AnyOfField = class extends Component2 {
962
962
  const newOption = intOption >= 0 ? retrievedOptions[intOption] : void 0;
963
963
  const oldOption = selectedOption >= 0 ? retrievedOptions[selectedOption] : void 0;
964
964
  let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);
965
- if (newFormData && newOption) {
965
+ if (newOption) {
966
966
  newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, "excludeObjectChildren");
967
967
  }
968
968
  this.setState({ selectedOption: intOption }, () => {
@@ -1132,13 +1132,13 @@ function NumberField(props) {
1132
1132
  const { StringField: StringField2 } = registry.fields;
1133
1133
  let value = formData;
1134
1134
  const handleChange = useCallback(
1135
- (value2) => {
1135
+ (value2, errorSchema, id) => {
1136
1136
  setLastValue(value2);
1137
1137
  if (`${value2}`.charAt(0) === ".") {
1138
1138
  value2 = `0${value2}`;
1139
1139
  }
1140
1140
  const processed = typeof value2 === "string" && value2.match(trailingCharMatcherWithPrefix) ? asNumber(value2.replace(trailingCharMatcher, "")) : asNumber(value2);
1141
- onChange(processed);
1141
+ onChange(processed, errorSchema, id);
1142
1142
  },
1143
1143
  [onChange]
1144
1144
  );