diff --git a/lib/index.js b/lib/index.js index e3e464e4..766d18a5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -113,6 +113,14 @@ export default class PhoneInput extends Component { return this.state.iso2; } + getOffset() { + if (this.props.offset === 0) { + return 0; + } + + return this.props.offset || 10; + } + selectCountry(iso2) { if (this.state.iso2 !== iso2) { const countryData = PhoneNumber.getCountryDataByCode(iso2); @@ -178,7 +186,7 @@ export default class PhoneInput extends Component { onPress={this.onPressFlag} /> - + { this.inputPhone = ref;