Skip to content

Commit

Permalink
Merge pull request #202 from InseeFrLab/fix_imposible_to_uncheck_chec…
Browse files Browse the repository at this point in the history
…kboxes

Fix ununcheckables fields
  • Loading branch information
garronej authored Jan 28, 2021
2 parents 0809fd2 + 103d22e commit aa54413
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ export const NouveauService: React.FC<Props> = ({
queryParams
]);

const handlechangeField = (path: string) => (value: string) => {
const handlechangeField = (path: string) => (value: any) => {
setFieldsValues({
...fieldsValues,
[path]: (()=>{
switch(typeof fieldsValues[path]){
case "boolean": return value === "true";
case "boolean": return value;
case "number": return Number.parseFloat(value);
default: return value;
}
Expand Down

0 comments on commit aa54413

Please sign in to comment.