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

This commit is contained in:
Ai Ling
2022-11-05 18:27:06 +08:00
committed by GitHub
parent ec1487b33b
commit 2979950c19
3 changed files with 4 additions and 4 deletions

View File

@@ -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);
}}
/>
);

View File

@@ -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);
}}
/>
);

View File

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