mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-07 07:34:17 +00:00
downgrade rjsf to last v5 beta version since the actual release breaks our usage of oneOf w/ burnettk
This commit is contained in:
parent
f86de1f564
commit
47d6ff322d
87
spiffworkflow-frontend/package-lock.json
generated
87
spiffworkflow-frontend/package-lock.json
generated
@ -19,10 +19,10 @@
|
|||||||
"@monaco-editor/react": "^4.4.5",
|
"@monaco-editor/react": "^4.4.5",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@rjsf/core": "*",
|
"@rjsf/core": "5.0.0-beta.20",
|
||||||
"@rjsf/mui": "^5.0.0-beta.13",
|
"@rjsf/mui": "5.0.0-beta.20",
|
||||||
"@rjsf/utils": "^5.0.0-beta.13",
|
"@rjsf/utils": "5.0.0-beta.20",
|
||||||
"@rjsf/validator-ajv8": "^5.0.0-beta.16",
|
"@rjsf/validator-ajv8": "5.0.0-beta.20",
|
||||||
"@tanstack/react-table": "^8.2.2",
|
"@tanstack/react-table": "^8.2.2",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
"@testing-library/react": "^13.3.0",
|
"@testing-library/react": "^13.3.0",
|
||||||
@ -5019,13 +5019,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/core": {
|
"node_modules/@rjsf/core": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-F61pIBgTrLzvGZvM16aGUUvro5QIDtI5pDdy24cfs5d9w1C/2Vc6Du6QMkml4d6B232IfQtYNHVo4Sg/8U3IYg==",
|
"integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.15",
|
||||||
"markdown-to-jsx": "^7.2.0",
|
|
||||||
"nanoid": "^3.3.4",
|
"nanoid": "^3.3.4",
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
},
|
},
|
||||||
@ -5033,14 +5032,14 @@
|
|||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rjsf/utils": "^5.0.0",
|
"@rjsf/utils": "^5.0.0-beta.1",
|
||||||
"react": "^16.14.0 || >=17"
|
"react": "^16.14.0 || >=17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/mui": {
|
"node_modules/@rjsf/mui": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-hEt7BL9mBYpZtGRmMEQ640KjxWy6AlgblB1P5d7YnhtX6P3c0shDgcrSDmGxIb04AaD2CJd9YOl7luaWFtVb8g==",
|
"integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
@ -5049,15 +5048,15 @@
|
|||||||
"@emotion/styled": "^11.6.0",
|
"@emotion/styled": "^11.6.0",
|
||||||
"@mui/icons-material": "^5.2.0",
|
"@mui/icons-material": "^5.2.0",
|
||||||
"@mui/material": "^5.2.2",
|
"@mui/material": "^5.2.2",
|
||||||
"@rjsf/core": "^5.0.0",
|
"@rjsf/core": "^5.0.0-beta.1",
|
||||||
"@rjsf/utils": "^5.0.0",
|
"@rjsf/utils": "^5.0.0-beta.1",
|
||||||
"react": ">=17"
|
"react": ">=17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/utils": {
|
"node_modules/@rjsf/utils": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-R7PkIu6Ea+DlPlUrWM0LSJ8aFxz/gAUs4yACgTwg03f55vD1efTmYg6McscY5AuFLYCp841fjGJlnRLac0kVcQ==",
|
"integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"json-schema-merge-allof": "^0.8.1",
|
"json-schema-merge-allof": "^0.8.1",
|
||||||
"jsonpointer": "^5.0.1",
|
"jsonpointer": "^5.0.1",
|
||||||
@ -5073,11 +5072,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/validator-ajv8": {
|
"node_modules/@rjsf/validator-ajv8": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-QVBE7khOAW67BPk+1KG4agF/P1lQ00oGjqGZU9lkObDAMaVxRo20585+a81AWdz+TJh0tBtBMrhTZuIh14fjMw==",
|
"integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": "^8.12.0",
|
"ajv": "^8.11.0",
|
||||||
"ajv-formats": "^2.1.1",
|
"ajv-formats": "^2.1.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"lodash-es": "^4.17.15"
|
"lodash-es": "^4.17.15"
|
||||||
@ -5086,7 +5085,7 @@
|
|||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rjsf/utils": "^5.0.0"
|
"@rjsf/utils": "^5.0.0-beta.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/plugin-babel": {
|
"node_modules/@rollup/plugin-babel": {
|
||||||
@ -21043,17 +21042,6 @@
|
|||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdown-to-jsx": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-3l4/Bigjm4bEqjCR6Xr+d4DtM1X6vvtGsMGSjJYyep8RjjIvcWtrXBS8Wbfe1/P+atKNMccpsraESIaWVplzVg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": ">= 0.14.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/matcher": {
|
"node_modules/matcher": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||||
@ -35661,27 +35649,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rjsf/core": {
|
"@rjsf/core": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-F61pIBgTrLzvGZvM16aGUUvro5QIDtI5pDdy24cfs5d9w1C/2Vc6Du6QMkml4d6B232IfQtYNHVo4Sg/8U3IYg==",
|
"integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.15",
|
||||||
"markdown-to-jsx": "^7.2.0",
|
|
||||||
"nanoid": "^3.3.4",
|
"nanoid": "^3.3.4",
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rjsf/mui": {
|
"@rjsf/mui": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-hEt7BL9mBYpZtGRmMEQ640KjxWy6AlgblB1P5d7YnhtX6P3c0shDgcrSDmGxIb04AaD2CJd9YOl7luaWFtVb8g==",
|
"integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"@rjsf/utils": {
|
"@rjsf/utils": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-R7PkIu6Ea+DlPlUrWM0LSJ8aFxz/gAUs4yACgTwg03f55vD1efTmYg6McscY5AuFLYCp841fjGJlnRLac0kVcQ==",
|
"integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-schema-merge-allof": "^0.8.1",
|
"json-schema-merge-allof": "^0.8.1",
|
||||||
"jsonpointer": "^5.0.1",
|
"jsonpointer": "^5.0.1",
|
||||||
@ -35691,11 +35678,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rjsf/validator-ajv8": {
|
"@rjsf/validator-ajv8": {
|
||||||
"version": "5.6.0",
|
"version": "5.0.0-beta.20",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz",
|
||||||
"integrity": "sha512-QVBE7khOAW67BPk+1KG4agF/P1lQ00oGjqGZU9lkObDAMaVxRo20585+a81AWdz+TJh0tBtBMrhTZuIh14fjMw==",
|
"integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^8.12.0",
|
"ajv": "^8.11.0",
|
||||||
"ajv-formats": "^2.1.1",
|
"ajv-formats": "^2.1.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"lodash-es": "^4.17.15"
|
"lodash-es": "^4.17.15"
|
||||||
@ -47910,12 +47897,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
|
||||||
"integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw=="
|
"integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw=="
|
||||||
},
|
},
|
||||||
"markdown-to-jsx": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-3l4/Bigjm4bEqjCR6Xr+d4DtM1X6vvtGsMGSjJYyep8RjjIvcWtrXBS8Wbfe1/P+atKNMccpsraESIaWVplzVg==",
|
|
||||||
"requires": {}
|
|
||||||
},
|
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
"@monaco-editor/react": "^4.4.5",
|
"@monaco-editor/react": "^4.4.5",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@rjsf/core": "*",
|
"@rjsf/core": "5.0.0-beta.20",
|
||||||
"@rjsf/mui": "^5.0.0-beta.13",
|
"@rjsf/mui": "5.0.0-beta.20",
|
||||||
"@rjsf/utils": "^5.0.0-beta.13",
|
"@rjsf/utils": "5.0.0-beta.20",
|
||||||
"@rjsf/validator-ajv8": "^5.0.0-beta.16",
|
"@rjsf/validator-ajv8": "5.0.0-beta.20",
|
||||||
"@tanstack/react-table": "^8.2.2",
|
"@tanstack/react-table": "^8.2.2",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
"@testing-library/react": "^13.3.0",
|
"@testing-library/react": "^13.3.0",
|
||||||
|
@ -54,13 +54,6 @@ export default function BaseInputTemplate<
|
|||||||
...getInputProps<T, S, F>(schema, type, options),
|
...getInputProps<T, S, F>(schema, type, options),
|
||||||
};
|
};
|
||||||
|
|
||||||
let inputValue;
|
|
||||||
if (inputProps.type === 'number' || inputProps.type === 'integer') {
|
|
||||||
inputValue = value || value === 0 ? value : '';
|
|
||||||
} else {
|
|
||||||
inputValue = value == null ? '' : value;
|
|
||||||
}
|
|
||||||
|
|
||||||
const _onChange = useCallback(
|
const _onChange = useCallback(
|
||||||
({ target: { value } }: React.ChangeEvent<HTMLInputElement>) =>
|
({ target: { value } }: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
onChange(value === '' ? options.emptyValue : value),
|
onChange(value === '' ? options.emptyValue : value),
|
||||||
|
@ -1,92 +1,58 @@
|
|||||||
// @ts-ignore
|
|
||||||
import { Select, SelectItem } from '@carbon/react';
|
import { Select, SelectItem } from '@carbon/react';
|
||||||
import { ChangeEvent, FocusEvent, SyntheticEvent, useCallback } from 'react';
|
import { WidgetProps, processSelectValue } from '@rjsf/utils';
|
||||||
import {
|
|
||||||
enumOptionsValueForIndex,
|
|
||||||
FormContextType,
|
|
||||||
RJSFSchema,
|
|
||||||
StrictRJSFSchema,
|
|
||||||
WidgetProps,
|
|
||||||
} from '@rjsf/utils';
|
|
||||||
|
|
||||||
function getValue(event: SyntheticEvent<HTMLSelectElement>, multiple: boolean) {
|
function SelectWidget({
|
||||||
if (multiple) {
|
|
||||||
return Array.from((event.target as HTMLSelectElement).options)
|
|
||||||
.slice()
|
|
||||||
.filter((o) => o.selected)
|
|
||||||
.map((o) => o.value);
|
|
||||||
}
|
|
||||||
return (event.target as HTMLSelectElement).value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The `SelectWidget` is a widget for rendering dropdowns.
|
|
||||||
* It is typically used with string properties constrained with enum options.
|
|
||||||
*
|
|
||||||
* @param props - The `WidgetProps` for this component
|
|
||||||
*/
|
|
||||||
function SelectWidget<
|
|
||||||
T = any,
|
|
||||||
S extends StrictRJSFSchema = RJSFSchema,
|
|
||||||
F extends FormContextType = any
|
|
||||||
>({
|
|
||||||
schema,
|
schema,
|
||||||
uiSchema,
|
|
||||||
id,
|
id,
|
||||||
options,
|
options,
|
||||||
value,
|
label,
|
||||||
|
required,
|
||||||
disabled,
|
disabled,
|
||||||
readonly,
|
readonly,
|
||||||
multiple = false,
|
value,
|
||||||
autofocus = false,
|
multiple,
|
||||||
|
autofocus,
|
||||||
onChange,
|
onChange,
|
||||||
onBlur,
|
onBlur,
|
||||||
onFocus,
|
onFocus,
|
||||||
|
uiSchema,
|
||||||
|
placeholder,
|
||||||
rawErrors = [],
|
rawErrors = [],
|
||||||
}: WidgetProps<T, S, F>) {
|
}: WidgetProps) {
|
||||||
const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;
|
const { enumOptions, enumDisabled } = options;
|
||||||
|
|
||||||
const emptyValue = multiple ? [] : '';
|
const emptyValue = multiple ? [] : '';
|
||||||
|
|
||||||
const handleFocus = useCallback(
|
const _onChange = ({
|
||||||
(event: FocusEvent<HTMLSelectElement>) => {
|
target: { value },
|
||||||
const newValue = getValue(event, multiple);
|
}: React.ChangeEvent<{ name?: string; value: unknown }>) =>
|
||||||
return onFocus(
|
onChange(processSelectValue(schema, value, options));
|
||||||
id,
|
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
|
||||||
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
|
onBlur(id, processSelectValue(schema, value, options));
|
||||||
);
|
const _onFocus = ({
|
||||||
},
|
target: { value },
|
||||||
[onFocus, id, schema, multiple, options]
|
}: React.FocusEvent<HTMLInputElement>) =>
|
||||||
);
|
onFocus(id, processSelectValue(schema, value, options));
|
||||||
|
|
||||||
const handleBlur = useCallback(
|
|
||||||
(event: FocusEvent<HTMLSelectElement>) => {
|
|
||||||
const newValue = getValue(event, multiple);
|
|
||||||
return onBlur(
|
|
||||||
id,
|
|
||||||
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
[onBlur, id, schema, multiple, options]
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleChange = useCallback(
|
|
||||||
(event: ChangeEvent<HTMLSelectElement>) => {
|
|
||||||
const newValue = getValue(event, multiple);
|
|
||||||
return onChange(
|
|
||||||
enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
[onChange, schema, multiple, options]
|
|
||||||
);
|
|
||||||
|
|
||||||
|
let labelToUse = label;
|
||||||
|
if (uiSchema && uiSchema['ui:title']) {
|
||||||
|
labelToUse = uiSchema['ui:title'];
|
||||||
|
} else if (schema && schema.title) {
|
||||||
|
labelToUse = schema.title;
|
||||||
|
}
|
||||||
let helperText = null;
|
let helperText = null;
|
||||||
if (uiSchema && uiSchema['ui:help']) {
|
if (uiSchema && uiSchema['ui:help']) {
|
||||||
helperText = uiSchema['ui:help'];
|
helperText = uiSchema['ui:help'];
|
||||||
}
|
}
|
||||||
|
if (required) {
|
||||||
|
labelToUse = `${labelToUse}*`;
|
||||||
|
}
|
||||||
|
|
||||||
let invalid = false;
|
let invalid = false;
|
||||||
let errorMessageForField = null;
|
let errorMessageForField = null;
|
||||||
if (rawErrors && rawErrors.length > 0) {
|
if (rawErrors && rawErrors.length > 0) {
|
||||||
invalid = true;
|
invalid = true;
|
||||||
|
// errorMessageForField = `${labelToUse.replace(/\*$/, '')} ${rawErrors[0]}`;
|
||||||
errorMessageForField = rawErrors[0];
|
errorMessageForField = rawErrors[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,9 +70,9 @@ function SelectWidget<
|
|||||||
disabled={disabled || readonly}
|
disabled={disabled || readonly}
|
||||||
autoFocus={autofocus}
|
autoFocus={autofocus}
|
||||||
error={rawErrors.length > 0}
|
error={rawErrors.length > 0}
|
||||||
onChange={handleChange}
|
onChange={_onChange}
|
||||||
onBlur={handleBlur}
|
onBlur={_onBlur}
|
||||||
onFocus={handleFocus}
|
onFocus={_onFocus}
|
||||||
invalid={invalid}
|
invalid={invalid}
|
||||||
invalidText={errorMessageForField}
|
invalidText={errorMessageForField}
|
||||||
InputLabelProps={{
|
InputLabelProps={{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user