#nicholaspuglia_unexpected

1 messages ¡ Page 1 of 1 (latest)

restive quartzBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1235844196556865536

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

worthy dawn
#

hello! give me a while to take a look

#

so for the onChange event, it only checks if the fields are completed, not if it's changed. So the fields are still complete when you copying and pasting a new credit card number, or any of the other fields

unborn solstice
#

That's strange when looking at the PaymentElementProps I can see a method called onChange which says it's triggered when data is changed

#

This onChange event is triggered on every keystroke but not when data is copy pasted into the field after already being completed

worthy dawn
#

Based off our Stripe docs : The change event is triggered when the Element's value changes. The event payload always contains certain keys, in addition to some Element-specific keys.

unborn solstice
#

Yes that's correct so if the cvc is 123 and I copy and paste a new cvc such as 456 I would expect the onChange to fire. It does not in my experience

worthy dawn
#

I think my understanding of when the value changes, is when the value in the event changes, not the value in the field

unborn solstice
#

But when you are typing the number out manually the event will get triggered on every keystroke. What value would be changing in that scenario?

worthy dawn
#

that's not what i'm getting on my own sample project