-
-
- {
- const next = v ?? ''
- setCountryCode(next)
- const currentLoc = locations.find((l) => l.id === form.getValues('locationId'))
- if (!next || !currentLoc || currentLoc.country !== next) {
- form.setValue('locationId', '')
- setPreview('')
- }
- void refreshPreview()
- }}
- placeholder="Страна"
- options={countryOptions}
- />
-
-
-
- {
- const id = v ?? ''
- form.setValue('locationId', id)
- const loc = locations.find((l) => l.id === id)
- if (loc?.country) setCountryCode(loc.country)
- void refreshPreview()
- }}
- placeholder={countryCode ? 'Локация' : 'Сначала страна'}
- options={locationOptions}
- />
-
-
+