mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
fix: ajustement du handlePhoneChange [#41]
This commit is contained in:
@ -63,7 +63,10 @@ export default function ResponsableInputFields({
|
||||
};
|
||||
|
||||
const addGuardian = () => {
|
||||
setGuardians([...guardians, { id: Date.now(), name: '', email: '' }]);
|
||||
setGuardians([
|
||||
...guardians,
|
||||
{ id: Date.now(), name: '', email: '', phone: '' },
|
||||
]);
|
||||
};
|
||||
|
||||
const deleteGuardian = (index) => {
|
||||
@ -148,7 +151,7 @@ export default function ResponsableInputFields({
|
||||
label="phone"
|
||||
value={item.phone}
|
||||
onChange={(event) => {
|
||||
onGuardiansChange(item.id, 'phone', event);
|
||||
onGuardiansChange(item.id, 'phone', event.target.value);
|
||||
}}
|
||||
required
|
||||
errorMsg={getError(index, 'phone')}
|
||||
|
||||
Reference in New Issue
Block a user