@rjsf/core 5.4.0 → 5.5.0
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.cjs.development.js +10 -5
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +10 -5
- package/dist/core.esm.js.map +1 -1
- package/dist/core.umd.development.js +10 -5
- package/dist/core.umd.development.js.map +1 -1
- package/dist/core.umd.production.min.js +1 -1
- package/dist/core.umd.production.min.js.map +1 -1
- package/package.json +8 -7
|
@@ -1573,6 +1573,7 @@ var ObjectField = /*#__PURE__*/function (_Component) {
|
|
|
1573
1573
|
required: required,
|
|
1574
1574
|
idSchema: idSchema,
|
|
1575
1575
|
uiSchema: uiSchema,
|
|
1576
|
+
errorSchema: errorSchema,
|
|
1576
1577
|
schema: schema,
|
|
1577
1578
|
formData: formData,
|
|
1578
1579
|
formContext: formContext,
|
|
@@ -2137,7 +2138,7 @@ function ArrayFieldTitleTemplate(props) {
|
|
|
2137
2138
|
});
|
|
2138
2139
|
}
|
|
2139
2140
|
|
|
2140
|
-
var _excluded$3 = ["id", "name", "value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "onChange", "onChangeOverride", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors", "type"];
|
|
2141
|
+
var _excluded$3 = ["id", "name", "value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "onChange", "onChangeOverride", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors", "type", "hideLabel", "hideError"];
|
|
2141
2142
|
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
2142
2143
|
* It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
|
|
2143
2144
|
* It can be customized/overridden for other themes or individual implementations as needed.
|
|
@@ -2225,7 +2226,7 @@ function SubmitButton(_ref) {
|
|
|
2225
2226
|
children: jsxRuntime.jsx("button", _extends({
|
|
2226
2227
|
type: 'submit'
|
|
2227
2228
|
}, submitButtonProps, {
|
|
2228
|
-
className: "btn btn-info " + submitButtonProps.className,
|
|
2229
|
+
className: "btn btn-info " + (submitButtonProps.className || ''),
|
|
2229
2230
|
children: submitText
|
|
2230
2231
|
}))
|
|
2231
2232
|
});
|
|
@@ -3211,6 +3212,7 @@ function extractFileInfo(dataURLs) {
|
|
|
3211
3212
|
function FileWidget(props) {
|
|
3212
3213
|
var disabled = props.disabled,
|
|
3213
3214
|
readonly = props.readonly,
|
|
3215
|
+
required = props.required,
|
|
3214
3216
|
multiple = props.multiple,
|
|
3215
3217
|
onChange = props.onChange,
|
|
3216
3218
|
value = props.value,
|
|
@@ -3243,6 +3245,7 @@ function FileWidget(props) {
|
|
|
3243
3245
|
children: [jsxRuntime.jsx(BaseInputTemplate, _extends({}, props, {
|
|
3244
3246
|
disabled: disabled || readonly,
|
|
3245
3247
|
type: 'file',
|
|
3248
|
+
required: value ? false : required,
|
|
3246
3249
|
onChangeOverride: handleChange,
|
|
3247
3250
|
value: '',
|
|
3248
3251
|
accept: options.accept ? String(options.accept) : undefined
|
|
@@ -3300,8 +3303,6 @@ function RadioWidget(_ref) {
|
|
|
3300
3303
|
onFocus = _ref.onFocus,
|
|
3301
3304
|
onChange = _ref.onChange,
|
|
3302
3305
|
id = _ref.id;
|
|
3303
|
-
// Generating a unique field name to identify this set of radio buttons
|
|
3304
|
-
var name = Math.random().toString();
|
|
3305
3306
|
var enumOptions = options.enumOptions,
|
|
3306
3307
|
enumDisabled = options.enumDisabled,
|
|
3307
3308
|
inline = options.inline,
|
|
@@ -3329,7 +3330,7 @@ function RadioWidget(_ref) {
|
|
|
3329
3330
|
type: 'radio',
|
|
3330
3331
|
id: utils.optionId(id, i),
|
|
3331
3332
|
checked: checked,
|
|
3332
|
-
name:
|
|
3333
|
+
name: id,
|
|
3333
3334
|
required: required,
|
|
3334
3335
|
value: String(i),
|
|
3335
3336
|
disabled: disabled || itemDisabled || readonly,
|
|
@@ -4012,6 +4013,10 @@ var Form = /*#__PURE__*/function (_Component) {
|
|
|
4012
4013
|
// if not an exact match, try finding an input starting with the element id (like radio buttons or checkboxes)
|
|
4013
4014
|
field = this.formElement.current.querySelector("input[id^=" + elementId);
|
|
4014
4015
|
}
|
|
4016
|
+
if (field.length) {
|
|
4017
|
+
// If we got a list with length > 0
|
|
4018
|
+
field = field[0];
|
|
4019
|
+
}
|
|
4015
4020
|
if (field) {
|
|
4016
4021
|
field.focus();
|
|
4017
4022
|
}
|