ordering-ui-react-native 0.25.1 → 0.26.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.25.1",
3
+ "version": "0.26.0",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -394,6 +394,14 @@ const AddressFormUI = (props: AddressFormParams) => {
394
394
  ...addressObj
395
395
  };
396
396
  updateChanges(addressSelected);
397
+
398
+ const zipcodeValue = addressObj.zipcode || addressSelected.zipcode;
399
+ if (zipcodeValue) {
400
+ setValue('zipcode', zipcodeValue);
401
+ }
402
+ if (addressSelected.address) {
403
+ setValue('address', addressSelected.address);
404
+ }
397
405
  };
398
406
 
399
407
  const handleAddressTag = (tag: string) => {
@@ -461,6 +469,18 @@ const AddressFormUI = (props: AddressFormParams) => {
461
469
  'address',
462
470
  formState?.changes?.address ?? addressState.address?.address ?? '',
463
471
  );
472
+ setValue(
473
+ 'zipcode',
474
+ formState?.changes?.zipcode ?? addressState.address?.zipcode ?? '',
475
+ );
476
+ setValue(
477
+ 'internal_number',
478
+ formState?.changes?.internal_number ?? addressState.address?.internal_number ?? '',
479
+ );
480
+ setValue(
481
+ 'address_notes',
482
+ formState?.changes?.address_notes ?? addressState.address?.address_notes ?? '',
483
+ );
464
484
  if (!isEditing) {
465
485
  formState?.changes?.address &&
466
486
  setLocationChange(formState?.changes?.location);
@@ -121,7 +121,7 @@ export const Otp = (props: otpParams) => {
121
121
  {!isCheckingCode && (
122
122
  <OtpInputs
123
123
  ref={inputRef}
124
- autofillFromClipboard={false}
124
+ autofillFromClipboard={true}
125
125
  numberOfInputs={pinCount}
126
126
  style={loginStyle.container}
127
127
  returnKeyType={'done'}