@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/index.js
CHANGED
|
@@ -1130,13 +1130,13 @@ function NumberField(props) {
|
|
|
1130
1130
|
const { StringField: StringField2 } = registry.fields;
|
|
1131
1131
|
let value = formData;
|
|
1132
1132
|
const handleChange = (0, import_react3.useCallback)(
|
|
1133
|
-
(value2) => {
|
|
1133
|
+
(value2, errorSchema, id) => {
|
|
1134
1134
|
setLastValue(value2);
|
|
1135
1135
|
if (`${value2}`.charAt(0) === ".") {
|
|
1136
1136
|
value2 = `0${value2}`;
|
|
1137
1137
|
}
|
|
1138
1138
|
const processed = typeof value2 === "string" && value2.match(trailingCharMatcherWithPrefix) ? (0, import_utils4.asNumber)(value2.replace(trailingCharMatcher, "")) : (0, import_utils4.asNumber)(value2);
|
|
1139
|
-
onChange(processed);
|
|
1139
|
+
onChange(processed, errorSchema, id);
|
|
1140
1140
|
},
|
|
1141
1141
|
[onChange]
|
|
1142
1142
|
);
|
|
@@ -1518,9 +1518,7 @@ function SchemaFieldRender(props) {
|
|
|
1518
1518
|
);
|
|
1519
1519
|
const FieldComponent = getFieldComponent(schema, uiOptions, idSchema, registry);
|
|
1520
1520
|
const disabled = Boolean(uiOptions.disabled ?? props.disabled);
|
|
1521
|
-
const readonly = Boolean(
|
|
1522
|
-
uiOptions.readonly ?? (props.readonly || props.schema.const || props.schema.readOnly || schema.readOnly)
|
|
1523
|
-
);
|
|
1521
|
+
const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));
|
|
1524
1522
|
const uiSchemaHideError = uiOptions.hideError;
|
|
1525
1523
|
const hideError = uiSchemaHideError === void 0 ? props.hideError : Boolean(uiSchemaHideError);
|
|
1526
1524
|
const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);
|