fix: misc

This commit is contained in:
Ibrahima G. Coulibaly
2024-07-09 21:58:08 +01:00
parent f3e5c0dec7
commit e4c726c7b5
6 changed files with 173 additions and 113 deletions

View File

@@ -24,7 +24,11 @@ const SelectWithDesc = <T extends string | boolean>({
description: string;
}) => {
const handleChange = (event: SelectChangeEvent<T>) => {
onChange(event.target.value as T);
const newValue =
typeof selected === 'boolean'
? event.target.value === 'true'
: event.target.value;
onChange(newValue as T);
};
return (