From a9c27d80ef29c0f8361b2a633c19fb69c0902a6b Mon Sep 17 00:00:00 2001 From: Jaejoon Han Date: Tue, 14 May 2024 09:47:26 +0900 Subject: [PATCH] keep the constants to for backwards compatibility Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com> --- packages/core/src/components/Form.tsx | 8 +++++++- packages/utils/src/constants.ts | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/core/src/components/Form.tsx b/packages/core/src/components/Form.tsx index 7e5dc64a33..2c0ea24e70 100644 --- a/packages/core/src/components/Form.tsx +++ b/packages/core/src/components/Form.tsx @@ -112,6 +112,11 @@ export interface FormProps void; //
HTML attributes /** The value of this prop will be passed to the `accept-charset` HTML attribute on the form */ +/** The value of this prop will be passed to the `accept-charset` HTML attribute on the form + * @deprecated replaced with `acceptCharset` which will supercede this value if both are specified + */ + acceptcharset?: string; +/** The value of this prop will be passed to the `accept-charset` HTML attribute on the form */ acceptCharset?: string; /** The value of this prop will be passed to the `action` HTML attribute on the form * @@ -870,6 +875,7 @@ export default class Form< action, autoComplete, enctype, + acceptcharset, acceptCharset, noHtml5Validate = false, disabled = false, @@ -905,7 +911,7 @@ export default class Form< action={action} autoComplete={autoComplete} encType={enctype} - acceptCharset={acceptCharset} + acceptCharset={acceptCharset || acceptcharset} noValidate={noHtml5Validate} onSubmit={this.onSubmit} as={as} diff --git a/packages/utils/src/constants.ts b/packages/utils/src/constants.ts index 2768d08bad..eb542aa85b 100644 --- a/packages/utils/src/constants.ts +++ b/packages/utils/src/constants.ts @@ -23,6 +23,10 @@ export const PROPERTIES_KEY = 'properties'; export const REQUIRED_KEY = 'required'; export const SUBMIT_BTN_OPTIONS_KEY = 'submitButtonOptions'; export const REF_KEY = '$ref'; +/** + * @deprecated Replace with correctly spelled constant `RJSF_ADDITIONAL_PROPERTIES_FLAG` + */ +export const RJSF_ADDITIONAL_PROPERTIES_FLAG = '__rjsf_additionalProperties'; export const RJSF_ADDITIONAL_PROPERTIES_FLAG = '__rjsf_additionalProperties'; export const ROOT_SCHEMA_PREFIX = '__rjsf_rootSchema'; export const UI_FIELD_KEY = 'ui:field';