🐛 Corrige la selection du taux AT collectif

Fixes #1322
pull/1328/head
Maxime Quandalle 2020-12-30 12:38:33 +01:00
parent 6d271511fd
commit 0bba79ebb5
1 changed files with 2 additions and 3 deletions

View File

@ -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 (
<>
<input