Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ module.exports = {
],
'@babel/preset-typescript',
],
plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-optional-chaining'],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-class-static-block',
],
};
460 changes: 177 additions & 283 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"homepage": "https://github.com/rjsf-team/react-jsonschema-form",
"devDependencies": {
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-transform-class-static-block": "^7.26.0",
"@nrwl/nx-cloud": "^15.3.5",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
"@rjsf/snapshot-tests": "^6.0.0-alpha.0",
"@rjsf/utils": "^6.0.0-alpha.0",
"@rjsf/validator-ajv8": "^6.0.0-alpha.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.202",
"@types/react": "^18.2.58",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/fields/ArrayField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class ArrayField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends For
} = this.props;
const { widgets, schemaUtils, formContext, globalUiOptions } = registry;
const itemsSchema = schemaUtils.retrieveSchema(schema.items as S, items);
const enumOptions = optionsList<S, T[], F>(itemsSchema, uiSchema);
const enumOptions = optionsList<T[], S, F>(itemsSchema, uiSchema);
const { widget = 'select', title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);
const Widget = getWidget<T[], S, F>(schema, widget, widgets);
const label = uiTitle ?? schema.title ?? name;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/fields/BooleanField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function BooleanField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extend
let enumOptions: EnumOptionsType<S>[] | undefined;
const label = uiTitle ?? schemaTitle ?? title ?? name;
if (Array.isArray(schema.oneOf)) {
enumOptions = optionsList<S, T, F>(
enumOptions = optionsList<T, S, F>(
{
oneOf: schema.oneOf
.map((option) => {
Expand Down Expand Up @@ -84,7 +84,7 @@ function BooleanField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extend
},
];
} else {
enumOptions = optionsList<S, T, F>(
enumOptions = optionsList<T, S, F>(
{
enum: enums,
// NOTE: enumNames is deprecated, but still supported for now.
Expand Down
Loading