Created
December 7, 2017 05:18
-
-
Save kaievns/3a74c62b23ec1a9e42cab90a22435dc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { field, TextInput } from 'a-plus-forms'; | |
@field() | |
class PhoneInput extends React.Component { | |
onChange = (text) => { | |
const phoneNumber = format(text); // to phone number | |
this.props.onChange(phoneNumber); | |
} | |
render() { | |
return <TextInput {...this.props} onChange={this.onChange} />; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment