diff --git a/client/src/pages/patients/inputs/HealthcareChoicesSearch.jsx b/client/src/pages/patients/inputs/HealthcareChoicesSearch.jsx index 575c55b1..b7355595 100644 --- a/client/src/pages/patients/inputs/HealthcareChoicesSearch.jsx +++ b/client/src/pages/patients/inputs/HealthcareChoicesSearch.jsx @@ -72,7 +72,7 @@ export default function HealthcareChoicesSearch({ form, choice, initialData }) { }; const handleSelectValue = (id, key) => { - const name = key.children; + const name = key.children.filter( el => el !== undefined).join('').trim(); setValue({ id, name }); setSearch(name); form.setFieldValue(`healthcareChoices.${choice}Id`, id);