|
|
@ -285,6 +285,7 @@ export function QuestionBirthplace({ |
|
|
if (resolvedC || updated.city) { |
|
|
if (resolvedC || updated.city) { |
|
|
setDetectedLocation([updated.city, resolvedC].filter(Boolean).join(", ")); |
|
|
setDetectedLocation([updated.city, resolvedC].filter(Boolean).join(", ")); |
|
|
} |
|
|
} |
|
|
|
|
|
lastInternalAnswerRef.current = typeof rawValue === "string" ? rawValue : null; |
|
|
}, [rawValue, locale]); |
|
|
}, [rawValue, locale]); |
|
|
|
|
|
|
|
|
const options = getCountryList(locale); |
|
|
const options = getCountryList(locale); |
|
|
@ -299,6 +300,7 @@ export function QuestionBirthplace({ |
|
|
setSelectedCountry(country); |
|
|
setSelectedCountry(country); |
|
|
closeSheet(); |
|
|
closeSheet(); |
|
|
updateAnswers(country, cityInput); |
|
|
updateAnswers(country, cityInput); |
|
|
|
|
|
setDetectedLocation([cityInput, country].filter(Boolean).join(", ")); |
|
|
window.setTimeout(() => { |
|
|
window.setTimeout(() => { |
|
|
cityInputRef.current?.focus({ preventScroll: true }); |
|
|
cityInputRef.current?.focus({ preventScroll: true }); |
|
|
}, EXIT_ANIMATION_MS); |
|
|
}, EXIT_ANIMATION_MS); |
|
|
@ -311,6 +313,7 @@ export function QuestionBirthplace({ |
|
|
const newCity = e.target.value; |
|
|
const newCity = e.target.value; |
|
|
setCityInput(newCity); |
|
|
setCityInput(newCity); |
|
|
updateAnswers(selectedCountry, newCity); |
|
|
updateAnswers(selectedCountry, newCity); |
|
|
|
|
|
setDetectedLocation([newCity, selectedCountry].filter(Boolean).join(", ")); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const isRtl = locale === "fa" || locale === "ar" || locale === "ur"; |
|
|
const isRtl = locale === "fa" || locale === "ar" || locale === "ur"; |
|
|
|