mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-02-13 07:36:29 +08:00
[offers][fix] Fix form typeaheads (#509)
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user