[offers][fix] Fix form typeaheads (#509)

pull/512/head
Ai Ling 2 years ago committed by GitHub
parent ec1487b33b
commit 2979950c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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