#marcoBach

1 messages · Page 1 of 1 (latest)

pale vergeBOT
verbal anchor
#

Hi there

agile elbow
#

Hi

verbal anchor
#

That will let you know when Payment Element is fully rendered

#

In terms of knowing whether a wallet was displayed... hmm

agile elbow
#

I used those event listener, but the event happen before the wallet button is fully displayed

verbal anchor
#

Ah interesting... that is likely because the canMakePayment stuff is running under the hood to check on the customers wallet

#

Can you tell me more about your use-case?

#

What are you doing once it is loaded?

agile elbow
#

at this moment the on ready event was already received

#

and after a while I have this:

verbal anchor
#

Hmm yeah I am seeing the same thing from a quick test with a breakpoint

#

I do feel like that is wrong and we are firing that too early here... I'll need to provide some feedback internally about this

agile elbow
#

In this scenario the google pay is not configured so the button is not showed in paymentElement, but I haven't this info so display the label 'Select a payment method' incorrectly.

verbal anchor
#

Yeah makes sense. Give me a moment

#

Try using the change event instead of the ready event

#

Ah actually that will only have the currently selected payment method type

#

Not the list

#

Hmmm

#

I'm not sure there is a way to do this. Let me check with a colleague

agile elbow
#

Yes I've tried to use also the change event but as you said there is not information I need

verbal anchor
#

Yeah okay I confirmed that unfortunately this isn't really possible right now.

#

I'll submit a feature request to get this added

#

But for now you won't want to dynamically show text based on what is rendered

agile elbow
#

ok, and for the ready event generated too early ?

verbal anchor
#

Well I think that is all a matter of perspective. I'll include that as feedback but will have to check with the Eng team for whether that is intentional or not.

#

I agree with you though that we should probably be holding off on that until the actual types are fully rendered as opposed to just the skeleton

#

Ah wait a second

#

I haven't messed with that in a while

#

Let me check

#

Yep if you set that to never then you won't see the skeleton

#

And it should all load at once

agile elbow
#

Ok, It's an options to set on the <Element ...> components, right ?

verbal anchor
#

Yes if you are using React then it would be the Elements provider

#

<Elements />

#

And you would pass it in the options object

agile elbow
#

Ok It worked, strange the delay to have the form fully displayed was reduced, but the render is a bit more scattered.

#

Many many many thanks for yours precious help 🙂

#

and sorry for my English