@rjsf/core 5.22.4 → 5.23.1
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 +3 -5
- package/dist/index.esm.js +3 -5
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +3 -5
- package/dist/index.js.map +2 -2
- package/lib/components/fields/NumberField.js +2 -2
- package/lib/components/fields/NumberField.js.map +1 -1
- package/lib/components/fields/SchemaField.js +1 -1
- package/lib/components/fields/SchemaField.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/components/fields/NumberField.tsx +3 -3
- package/src/components/fields/SchemaField.tsx +1 -3
package/dist/core.umd.js
CHANGED
|
@@ -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
|
);
|
|
@@ -1428,9 +1428,7 @@
|
|
|
1428
1428
|
);
|
|
1429
1429
|
const FieldComponent = getFieldComponent(schema, uiOptions, idSchema, registry);
|
|
1430
1430
|
const disabled = Boolean(uiOptions.disabled ?? props.disabled);
|
|
1431
|
-
const readonly = Boolean(
|
|
1432
|
-
uiOptions.readonly ?? (props.readonly || props.schema.const || props.schema.readOnly || schema.readOnly)
|
|
1433
|
-
);
|
|
1431
|
+
const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));
|
|
1434
1432
|
const uiSchemaHideError = uiOptions.hideError;
|
|
1435
1433
|
const hideError = uiSchemaHideError === void 0 ? props.hideError : Boolean(uiSchemaHideError);
|
|
1436
1434
|
const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);
|
package/dist/index.esm.js
CHANGED
|
@@ -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
|
);
|
|
@@ -1541,9 +1541,7 @@ function SchemaFieldRender(props) {
|
|
|
1541
1541
|
);
|
|
1542
1542
|
const FieldComponent = getFieldComponent(schema, uiOptions, idSchema, registry);
|
|
1543
1543
|
const disabled = Boolean(uiOptions.disabled ?? props.disabled);
|
|
1544
|
-
const readonly = Boolean(
|
|
1545
|
-
uiOptions.readonly ?? (props.readonly || props.schema.const || props.schema.readOnly || schema.readOnly)
|
|
1546
|
-
);
|
|
1544
|
+
const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));
|
|
1547
1545
|
const uiSchemaHideError = uiOptions.hideError;
|
|
1548
1546
|
const hideError = uiSchemaHideError === void 0 ? props.hideError : Boolean(uiSchemaHideError);
|
|
1549
1547
|
const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);
|