diff --git a/package-lock.json b/package-lock.json index eeeeaaef..40e41f60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,7 +70,7 @@ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "requires": { "pify": "^4.0.1", - "semver": "^5.6.0" + "semver": "^7.5.3" }, "dependencies": { "semver": { diff --git a/src/components/fields/field-select/field-select.component.tsx b/src/components/fields/field-select/field-select.component.tsx index 49e7c1da..33ae9db5 100644 --- a/src/components/fields/field-select/field-select.component.tsx +++ b/src/components/fields/field-select/field-select.component.tsx @@ -28,7 +28,7 @@ interface ExternalProps { showLabel: boolean; showRequired: boolean; label: string; - placeHolder?: string; + placeholder?: string; onClear: () => void; onChange: () => void; onInputChange?: (arg: string) => void; @@ -58,7 +58,7 @@ const SelectFieldPure: FC = ({ showRequired, defaultValue, label, - placeHolder, + placeholder, onClear, onChange, onInputChange, @@ -106,7 +106,7 @@ const SelectFieldPure: FC = ({ maxMenuHeight={450} options={options} isClearable - placeholder={placeHolder ?? localization.select} + placeholder={placeholder ?? localization.select} name={name} value={defaultValue} onChange={option => diff --git a/src/pages/concept-registration-page/form-concept/internal-info/index.tsx b/src/pages/concept-registration-page/form-concept/internal-info/index.tsx index a13f7686..f782458c 100644 --- a/src/pages/concept-registration-page/form-concept/internal-info/index.tsx +++ b/src/pages/concept-registration-page/form-concept/internal-info/index.tsx @@ -100,7 +100,7 @@ const renderInternalField = ( = ({ catalogId, errors }) => { ({ label: item.name, value: item.id }))} + isClearable + onClear={form => form.setFieldValue('assignedUser', '')} onChange={(form, f, option) => form.setFieldValue(f, option.value)} + defaultValue={{ + value: values.assignedUser, + label: userList.find(user => user.id === values.assignedUser)?.name + }} /> diff --git a/src/pages/concept-registration-page/form-concept/related-concepts/components/relation/index.tsx b/src/pages/concept-registration-page/form-concept/related-concepts/components/relation/index.tsx index fed825a6..1e637661 100644 --- a/src/pages/concept-registration-page/form-concept/related-concepts/components/relation/index.tsx +++ b/src/pages/concept-registration-page/form-concept/related-concepts/components/relation/index.tsx @@ -201,7 +201,7 @@ const RelationItem: FC = ({ = ({ form.setFieldValue(field.name, '')} diff --git a/src/pages/concept-registration-page/form-concept/validity/validity.component.tsx b/src/pages/concept-registration-page/form-concept/validity/validity.component.tsx index e1f413e0..f495dd87 100644 --- a/src/pages/concept-registration-page/form-concept/validity/validity.component.tsx +++ b/src/pages/concept-registration-page/form-concept/validity/validity.component.tsx @@ -98,7 +98,7 @@ export const Validity: FC = () => { form.setFieldValue(erstattesAv.name, '')}