@rjsf/core 5.18.2 → 5.18.4
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/LICENSE.md +1 -1
- package/dist/core.umd.js +3 -2
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +2 -2
- package/lib/components/Form.d.ts +7 -3
- package/lib/components/Form.js +4 -4
- package/lib/components/Form.js.map +1 -1
- package/lib/components/fields/ArrayField.d.ts +7 -7
- package/lib/components/fields/BooleanField.d.ts +1 -2
- package/lib/components/fields/MultiSchemaField.d.ts +1 -1
- package/lib/components/fields/NumberField.d.ts +1 -2
- package/lib/components/fields/ObjectField.d.ts +1 -1
- package/lib/components/fields/SchemaField.d.ts +1 -1
- package/lib/components/fields/StringField.d.ts +1 -2
- package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +1 -2
- package/lib/components/templates/ArrayFieldItemTemplate.d.ts +1 -2
- package/lib/components/templates/ArrayFieldTemplate.d.ts +1 -2
- package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +1 -2
- package/lib/components/templates/BaseInputTemplate.d.ts +1 -2
- package/lib/components/templates/ButtonTemplates/AddButton.d.ts +1 -2
- package/lib/components/templates/ButtonTemplates/IconButton.d.ts +5 -6
- package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts +1 -2
- package/lib/components/templates/DescriptionField.d.ts +1 -2
- package/lib/components/templates/ErrorList.d.ts +1 -2
- package/lib/components/templates/FieldErrorTemplate.d.ts +1 -2
- package/lib/components/templates/FieldHelpTemplate.d.ts +1 -2
- package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts +1 -2
- package/lib/components/templates/FieldTemplate/Label.d.ts +1 -2
- package/lib/components/templates/ObjectFieldTemplate.d.ts +1 -2
- package/lib/components/templates/TitleField.d.ts +1 -2
- package/lib/components/templates/UnsupportedField.d.ts +1 -2
- package/lib/components/templates/WrapIfAdditionalTemplate.d.ts +1 -2
- package/lib/components/widgets/AltDateTimeWidget.d.ts +1 -2
- package/lib/components/widgets/AltDateWidget.d.ts +1 -2
- package/lib/components/widgets/CheckboxWidget.d.ts +1 -2
- package/lib/components/widgets/CheckboxesWidget.d.ts +1 -2
- package/lib/components/widgets/ColorWidget.d.ts +1 -2
- package/lib/components/widgets/DateTimeWidget.d.ts +1 -2
- package/lib/components/widgets/DateWidget.d.ts +1 -2
- package/lib/components/widgets/EmailWidget.d.ts +1 -2
- package/lib/components/widgets/FileWidget.d.ts +1 -2
- package/lib/components/widgets/HiddenWidget.d.ts +1 -2
- package/lib/components/widgets/PasswordWidget.d.ts +1 -2
- package/lib/components/widgets/RadioWidget.d.ts +1 -2
- package/lib/components/widgets/RangeWidget.d.ts +1 -2
- package/lib/components/widgets/SelectWidget.d.ts +1 -2
- package/lib/components/widgets/TextWidget.d.ts +1 -2
- package/lib/components/widgets/TextareaWidget.d.ts +1 -2
- package/lib/components/widgets/TimeWidget.d.ts +1 -2
- package/lib/components/widgets/URLWidget.d.ts +1 -2
- package/lib/components/widgets/UpDownWidget.d.ts +1 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/src/components/Form.tsx +9 -4
package/src/components/Form.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
RegistryWidgetsType,
|
|
21
21
|
RJSFSchema,
|
|
22
22
|
RJSFValidationError,
|
|
23
|
-
|
|
23
|
+
RJSF_ADDITIONAL_PROPERTIES_FLAG,
|
|
24
24
|
SchemaUtilsType,
|
|
25
25
|
shouldRender,
|
|
26
26
|
SUBMIT_BTN_OPTIONS_KEY,
|
|
@@ -111,8 +111,12 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
|
|
|
111
111
|
*/
|
|
112
112
|
onFocus?: (id: string, data: any) => void;
|
|
113
113
|
// <form /> HTML attributes
|
|
114
|
-
/** The value of this prop will be passed to the `accept-charset` HTML attribute on the form
|
|
114
|
+
/** The value of this prop will be passed to the `accept-charset` HTML attribute on the form
|
|
115
|
+
* @deprecated replaced with `acceptCharset` which will supercede this value if both are specified
|
|
116
|
+
*/
|
|
115
117
|
acceptcharset?: string;
|
|
118
|
+
/** The value of this prop will be passed to the `accept-charset` HTML attribute on the form */
|
|
119
|
+
acceptCharset?: string;
|
|
116
120
|
/** The value of this prop will be passed to the `action` HTML attribute on the form
|
|
117
121
|
*
|
|
118
122
|
* NOTE: this just renders the `action` attribute in the HTML markup. There is no real network request being sent to
|
|
@@ -537,7 +541,7 @@ export default class Form<
|
|
|
537
541
|
if (typeof _obj[key] === 'object') {
|
|
538
542
|
const newPaths = paths.map((path) => [...path, key]);
|
|
539
543
|
// If an object is marked with additionalProperties, all its keys are valid
|
|
540
|
-
if (_obj[key][
|
|
544
|
+
if (_obj[key][RJSF_ADDITIONAL_PROPERTIES_FLAG] && _obj[key][NAME_KEY] !== '') {
|
|
541
545
|
acc.push(_obj[key][NAME_KEY]);
|
|
542
546
|
} else {
|
|
543
547
|
getAllPaths(_obj[key], acc, newPaths);
|
|
@@ -871,6 +875,7 @@ export default class Form<
|
|
|
871
875
|
autoComplete,
|
|
872
876
|
enctype,
|
|
873
877
|
acceptcharset,
|
|
878
|
+
acceptCharset,
|
|
874
879
|
noHtml5Validate = false,
|
|
875
880
|
disabled = false,
|
|
876
881
|
readonly = false,
|
|
@@ -905,7 +910,7 @@ export default class Form<
|
|
|
905
910
|
action={action}
|
|
906
911
|
autoComplete={autoComplete}
|
|
907
912
|
encType={enctype}
|
|
908
|
-
acceptCharset={acceptcharset}
|
|
913
|
+
acceptCharset={acceptCharset || acceptcharset}
|
|
909
914
|
noValidate={noHtml5Validate}
|
|
910
915
|
onSubmit={this.onSubmit}
|
|
911
916
|
as={as}
|