Skip to content

Commit

Permalink
keep the constants to for backwards compatibility
Browse files Browse the repository at this point in the history
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
  • Loading branch information
HanJaeJoon and heath-freenome committed May 14, 2024
1 parent 2d04e2d commit a9c27d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
onFocus?: (id: string, data: any) => void;
// <form /> 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
*
Expand Down Expand Up @@ -870,6 +875,7 @@ export default class Form<
action,
autoComplete,
enctype,
acceptcharset,
acceptCharset,
noHtml5Validate = false,
disabled = false,
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions packages/utils/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit a9c27d8

Please sign in to comment.