diff --git a/mon-entreprise/source/components/conversation/select/SelectTauxRisque.js b/mon-entreprise/source/components/conversation/select/SelectTauxRisque.js index 1c11044e5..adc2988e4 100644 --- a/mon-entreprise/source/components/conversation/select/SelectTauxRisque.js +++ b/mon-entreprise/source/components/conversation/select/SelectTauxRisque.js @@ -6,8 +6,7 @@ const worker = new Worker() function SelectComponent({ onChange, onSubmit, options }) { const [searchResults, setSearchResults] = useState() let submitOnChange = (option) => { - option.text = +option['Taux net'].replace(',', '.') - onChange(option.text) + onChange(option['Taux net'].replace(',', '.') + '%') onSubmit() } const { t } = useTranslation() @@ -17,7 +16,7 @@ function SelectComponent({ onChange, onSubmit, options }) { }) worker.onmessage = ({ data: results }) => setSearchResults(results) - }, []) + }, [options]) return ( <>