This commit is contained in:
Nicolas
2025-02-22 17:23:27 +01:00
9 changed files with 199 additions and 47 deletions

View File

@@ -35,7 +35,11 @@ const SelectCom = <T extends FieldValues>({
<SelectTemplate
{...form.register(name, formOptions)}
onChange={(newValue: any) => {
form.setValue(name, newValue);
if ('value' in newValue) {
form.setValue(name, newValue.value);
} else {
form.setValue(name, newValue);
}
form.trigger(name);
}}
className={cn('w-full placeholder:text-neutral-600', className)}