Skip to content
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

Clear data in CardField #495

Closed
aec2f opened this issue Aug 5, 2021 · 2 comments
Closed

Clear data in CardField #495

aec2f opened this issue Aug 5, 2021 · 2 comments
Labels
enhancement New feature or request need triage

Comments

@aec2f
Copy link

aec2f commented Aug 5, 2021

I'm looking to clear the data in the Stripe element Card Field. But don't see a way to do this via the element.

image

                <CardField
                    onCardChange={(cardDetails) => {
                        setCardDetails(cardDetails);
                    }}
                    style={styles.cardField}
                    postalCodeEnabled={true}
                    
                />
@thorsten-stripe thorsten-stripe added enhancement New feature or request need triage labels Aug 10, 2021
@arekkubaczkowski
Copy link
Collaborator

you need to use ref and call clear method on this. Please check this pr description #337

@aec2f
Copy link
Author

aec2f commented Aug 11, 2021

you need to use ref and call clear method on this. Please check this pr description #337

Thanks! Although I'm using expo so it appears I have to wait for the release of expo 43 to get this? I tried just updating the package to 0.2.0 but that I get the error "No command found with name "clear"". Although the ref.current seems to have it:
Object {
"blur": [Function blur],
"clear": [Function clear],
"focus": [Function focus],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need triage
Projects
None yet
Development

No branches or pull requests

3 participants