ordering-ui-react-native 0.16.29 → 0.16.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -210,9 +210,22 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
210
210
|
}
|
|
211
211
|
if ( addressType === 'postal_code') {
|
|
212
212
|
postalCode = component.short_name
|
|
213
|
+
if (isObjet) {
|
|
214
|
+
setValue('zipcode', postalCode)
|
|
215
|
+
handleChangeInput({ target: { name: 'zipcode', value: postalCode } })
|
|
216
|
+
}
|
|
213
217
|
}
|
|
214
218
|
}
|
|
215
219
|
isObjet ? address = addressValue.join(', ') : address
|
|
220
|
+
|
|
221
|
+
if (isObjet) {
|
|
222
|
+
setValue('address', address)
|
|
223
|
+
handleChangeInput({ target: { name: 'address', value: address } })
|
|
224
|
+
googleInput?.current?.setAddressText(address)
|
|
225
|
+
setLoadingLocation(false)
|
|
226
|
+
return
|
|
227
|
+
}
|
|
228
|
+
|
|
216
229
|
data.address = {
|
|
217
230
|
address,
|
|
218
231
|
location: json.results[0].geometry.location,
|
|
@@ -597,7 +610,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
597
610
|
name='zipcode'
|
|
598
611
|
rules={{ required: isRequiredField && isRequiredField('zipcode') ? t(`VALIDATION_ERROR_ZIP_CODE_REQUIRED`, `The field Zip Code is required`) : null }}
|
|
599
612
|
defaultValue={address?.zipcode || formState.changes?.zipcode || addressState.address.zipcode || ''}
|
|
600
|
-
render={() => (
|
|
613
|
+
render={({ value }) => (
|
|
601
614
|
<OInput
|
|
602
615
|
name='zipcode'
|
|
603
616
|
placeholder={t('ZIP_CODE', 'Zip code')}
|
|
@@ -605,7 +618,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
605
618
|
handleChangeInput(text)
|
|
606
619
|
setValue('zipcode', text)
|
|
607
620
|
}}
|
|
608
|
-
value={address?.zipcode || formState.changes?.zipcode || addressState.address.zipcode || ''}
|
|
621
|
+
value={value || address?.zipcode || formState.changes?.zipcode || addressState.address.zipcode || ''}
|
|
609
622
|
style={styles.inputsStyle}
|
|
610
623
|
forwardRef={zipCodeRef}
|
|
611
624
|
returnKeyType='next'
|