You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: Trying to add an onClick listener to the save button, but there isn't a way to do that.
I see there's the submit prop (added here), which I thought would be triggered on submission (i.e. on click), but the official SDK docs say this event is only emitted by pressing "Enter" while editing a field (crucially, not on click). I have verified this by adding a log into my submit handler:
<CreditCardInput
text="Text"
submitButtonId={submitButtonId}
children={isCardProcessing ? <LoadingIcon/> : null}
submit={(e) => {
console.log('executing submit callback') // never logged on click. does log on `enter`
setIsCardProcessing(true)
}}
/>
Describe the solution you'd like
Add an onClick field to the buttonProps prop of the CreditCardInput (a la what you proposed here). From there, pass it to the button.
Describe alternatives you've considered
Passing the callback to the submit prop, but that's only triggered when you hit Enter.
The text was updated successfully, but these errors were encountered:
Hi @man-of-seafood currently in the canary version we support all kind of props for the button element, so you can write it and will appear all the methods that support it. Can you give it a try on canary and see if it's working?
Describe the feature you'd like to request
Context: Trying to add an
onClick
listener to the save button, but there isn't a way to do that.I see there's the
submit
prop (added here), which I thought would be triggered on submission (i.e. on click), but the official SDK docs say this event is only emittedby pressing "Enter" while editing a field
(crucially, not on click). I have verified this by adding a log into mysubmit
handler:Describe the solution you'd like
Add an
onClick
field to thebuttonProps
prop of theCreditCardInput
(a la what you proposed here). From there, pass it to the button.Describe alternatives you've considered
Passing the callback to the
submit
prop, but that's only triggered when you hitEnter
.The text was updated successfully, but these errors were encountered: