Skip to content
Snippets Groups Projects
Verified Commit 26c584dc authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Pass controller prop.

parent ab7d7b94
No related branches found
No related tags found
2 merge requests!60New component to search senior (see #12). Enhance responsiveness and solve #10 and #11,!58Camelize data and insert react-hook-form in autocomplete.
Pipeline #12692 passed
......@@ -21,7 +21,15 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
handleClose,
isOpen,
}: ReservationDialogProps) => {
const { control, handleSubmit } = useForm<ReservationProps>();
const { control, handleSubmit } = useForm<ReservationProps>({
mode: 'onSubmit',
defaultValues: {
date: '',
time: '',
destination: '',
departure: '',
},
});
const reservation = useReservations();
......@@ -46,7 +54,7 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
Write here below the details of your next reservation
</DialogContentText>
<SeniorSearch />
<SeniorSearch control={control} />
<InputField
name="name"
label="Name Reservation"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment