Comments (3)
Hey @kraffslol
I just released 0.2.5 which has a setValues method that you could access by refs
e.g. this.refs.CCInput.setValues({ expiry: "11/11" })
Let me know if this covers your use case!
Sam
from react-native-credit-card-input.
Yes, thats exactly what I was looking for! Thank you.
from react-native-credit-card-input.
I know this issue has been closed but I found a quick solution (hopefully this prop is actually added to the component) to add default values without having to use a ref.
class DefaultCreditCardInput extends CreditCardInput {
constructor(props) {
super(props);
this.state = {
...this.state,
values: props.values
};
}
}
....
<DefaultCreditCardInput
values={{number: '123512312', name: 'Charles Ramrodding'}}
....
Hopefully this helps (there is a PR to fix this issue #105)
from react-native-credit-card-input.
Related Issues (20)
- Kindly Resolve this issue please : componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details. HOT 3
- How to configure form vertically? HOT 2
- Unable to resolve "react-native-credit-card-input" HOT 1
- Send all PRs to me 🚨 HOT 2
- lines between the inputs HOT 1
- placeholder not being dispaly
- reset values HOT 2
- How can i add a submit button and send all the form values? HOT 1
- Focus Bug on LiteCreditCardInput (Temp Workaround)
- Is credit or debit?
- Weird top padding while scaling
- Applying transformation to X axis too
- Warning: componentWillReceiveProps has been renamed HOT 1
- Warning: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types' HOT 1
- Credit card number
- this lib cause a runtime exeption TypeError: undefined is not an object (evaluating '_reactNative.Text.propTypes.style')
- Fix ViewPropTypes deprecation error HOT 1
- ViewPropsType deprecated error [fixed] HOT 7
- ViewPropsType deprecated error
- Solves issues related to ViewPropTypes using deprecated-react-native-prop-type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-credit-card-input.