[offers][fix] Fix form typeaheads

pull/509/head
Ai Ling 3 years ago
parent ec1487b33b
commit a48b8b1a87

@ -30,7 +30,7 @@ export default function FormCitiesTypeahead({ names, ...props }: Props) {
}}
onSelect={(option) => {
setValue(names.value, option?.value);
setValue(names.label, option?.value);
setValue(names.label, option?.label);
}}
/>
);

@ -29,7 +29,7 @@ export default function FormCompaniesTypeahead({ names, ...props }: Props) {
}}
onSelect={(option) => {
setValue(names.value, option?.value);
setValue(names.label, option?.value);
setValue(names.label, option?.label);
}}
/>
);

@ -112,7 +112,7 @@ function FullTimeOfferDetailsForm({
errorMessage={offerFields?.cityId?.message}
names={{
label: `offers.${index}.cityName`,
value: `offers.${index}.companyId`,
value: `offers.${index}.cityId`,
}}
required={true}
/>
@ -327,7 +327,7 @@ function InternshipOfferDetailsForm({
errorMessage={offerFields?.cityId?.message}
names={{
label: `offers.${index}.cityName`,
value: `offers.${index}.companyId`,
value: `offers.${index}.cityId`,
}}
required={true}
/>

Loading…
Cancel
Save