#kacperwilczewski

1 messages · Page 1 of 1 (latest)

brave radishBOT
teal haven
#

Hi there, it sounds like a bug to me.

mystic knot
#
<AddressElement
  onChange={(event) => {
    handleAddressElementChange(event, setFieldValue, values);
  }}
  options={{
    mode: 'shipping',
    fields: {
      phone: 'always',
    },
    validation: {
      phone: {
        required: 'always',
      },
    },
    defaultValues: {
      name: '.',
      phone: loggedUser?.company.phone_number || '',
      address: {
        line1: loggedUser?.company.address || '',
        line2: '',
        city: loggedUser?.company.city || '',
        state: loggedUser?.company.state || '',
        postal_code: loggedUser?.company.zip_code || '',
        country: loggedUser?.company.country || '',
      },
    },
  }}
/>
teal haven
#

What's the value of loggedUser?.company.phone_number ?

mystic knot
#

+48123123123

teal haven
#

OK, and the AddressElement will display +48+48123123123 ?

brave radishBOT
waxen vault
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

mystic knot
#

I think it should be 123123123 correctly.

waxen vault
#

yes I agree

mystic knot
#

We see a dropdown that correctly shows +48, but I don't know why it is repeated in the next input.

waxen vault
#

so we can try to fix it internally and get back to you once we do

mystic knot
#

So you think the error is not on my side but on Stripe's?