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
When I add the option readOnly in the PaymentElement component, I can't click on the other options:
However, if I switch the layout to accordion, I can click on the options:
If I let the Google option open and switch the layout to tabs, this selected option keeps open:
Expected behaviour: it seems that I should be able to click on the other options when the readOnly option is set to true and I am using the tabs layout.
Code example:
import*asReactfrom"react";import{Elements,PaymentElement}from"@stripe/react-stripe-js";import{loadStripe}from"@stripe/stripe-js";exportdefaultfunctionHome(){conststripePromise=loadStripe("pk_test_6pRNASCoBOKtIshFeQd4XMUh");conststripeElementOptions={mode: "payment",amount: 1099,currency: "usd",};constoptions={layout: "tabs",// change the layout here to accordion or tabsreadOnly: true,};return(<Elementsstripe={stripePromise}options={stripeElementOptions}><PaymentElementoptions={options}/></Elements>);}
Environment
No response
Reproduction
No response
The text was updated successfully, but these errors were encountered:
Hi @Rahmon, thanks for the report. I've verified this is not working as intended (although I think the intended behavior is that accordion layout will also not allow you to change payment methods).
We're tracking this issue internally and will update here when a fix is rolled out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What happened?
Hello,
When I add the option readOnly in the PaymentElement component, I can't click on the other options:
However, if I switch the layout to
accordion
, I can click on the options:If I let the Google option open and switch the layout to tabs, this selected option keeps open:
Expected behaviour: it seems that I should be able to click on the other options when the
readOnly
option is set totrue
and I am using the tabs layout.Code example:
Environment
No response
Reproduction
No response
The text was updated successfully, but these errors were encountered: