Skip to content

Conversation

@retyui
Copy link
Owner

@retyui retyui commented Aug 19, 2018

No description provided.

@retyui retyui merged commit 3db0550 into master Aug 19, 2018
@retyui retyui deleted the v2 branch August 19, 2018 10:00
@kevinhury
Copy link

hey. any plans on adding keyboard type?

ttdung11t2/react-native-confirmation-code-input#39

@retyui
Copy link
Owner Author

retyui commented Aug 28, 2018

@kevinhury

You can use getInputProps prop to set any property to all TextFields

https://github.com/retyui/react-native-confirmation-code-field/blob/master/docs/API.md#getinputprops-index-number--object

import React, { Component } from 'react';
import CodeInput from 'react-native-confirmation-code-field';


const defaultTextFieldProps = {
	keyboardType: 'numeric'
};

class App extends Component {
  handlerOnFulfill = code => console.log(code);

  getInputProps = () => defaultTextFieldProps;

  render() {
    return <CodeInput
    	getInputProps={this.getInputProps}
    	onFulfill={this.handlerOnFulfill} />;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants