New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CardView + CardComponent opening wrong view #656
Comments
Thanks for reaching out. This is a known limitation in the components. Internally the The cleanest workaround IMO is to create a separate fragment for the component so that it always gets attached to a new lifecycle. Alternatively you can try to create a different CardComponent.PROVIDER.get(
savedStateRegistryOwner,
viewModelStoreOwner,
cardPaymentMethod,
cardConfiguration,
defaultArgs
) |
Having a separate fragment is okay as a workaround, but as soon as we would like to switch to compose without fragments this will fail. |
Yes indeed it won't work with Compose, but maybe the |
Describe the bug
When I have stored payment methods and normal payment methods inside the same custom screen and the user clicks first on stored payment then closes the CardView and opens the normal payment, the view is still showing the details from the previous card and only asking for CVC. It is the same case when the user first clicks normal payment and then the stored then the view is not filled and not asking only for the CVC. It is probably caused by using the same owner.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All the fieleds can be filled out.
Smartphone (please complete the following information):
Additional context
This is how I call it:
The text was updated successfully, but these errors were encountered: