react-telephone-input
Advanced tools
Comparing version 4.5.8 to 4.5.9
@@ -329,2 +329,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var diff = formattedNumber.length - oldFormattedText.length; | ||
var selectedCountry = newSelectedCountry.dialCode.length > 0 ? newSelectedCountry : this.state.selectedCountry; | ||
@@ -334,3 +335,3 @@ this.setState({ | ||
freezeSelection: freezeSelection, | ||
selectedCountry: newSelectedCountry.dialCode.length > 0 ? newSelectedCountry : this.state.selectedCountry | ||
selectedCountry: selectedCountry | ||
}, function () { | ||
@@ -352,3 +353,3 @@ if (isModernBrowser) { | ||
if (this.props.onChange) { | ||
this.props.onChange(this.state.formattedNumber, this.state.selectedCountry); | ||
this.props.onChange(formattedNumber, selectedCountry); | ||
} | ||
@@ -567,7 +568,9 @@ }); | ||
getFlagStyle: function getFlagStyle() { | ||
return { | ||
width: 16, | ||
height: 11, | ||
backgroundImage: "url(" + this.props.flagsImagePath + ")" | ||
}; | ||
if (this.props.flagsImagePath) { | ||
return { | ||
backgroundImage: "url(" + this.props.flagsImagePath + ")" | ||
}; | ||
} else { | ||
return {}; | ||
} | ||
}, | ||
@@ -574,0 +577,0 @@ handleInputBlur: function handleInputBlur() { |
@@ -344,2 +344,3 @@ "use strict"; | ||
var diff = formattedNumber.length - oldFormattedText.length; | ||
var selectedCountry = newSelectedCountry.dialCode.length > 0 ? newSelectedCountry : this.state.selectedCountry; | ||
@@ -349,3 +350,3 @@ this.setState({ | ||
freezeSelection: freezeSelection, | ||
selectedCountry: newSelectedCountry.dialCode.length > 0 ? newSelectedCountry : this.state.selectedCountry | ||
selectedCountry: selectedCountry | ||
}, function () { | ||
@@ -367,3 +368,3 @@ if (isModernBrowser) { | ||
if (this.props.onChange) { | ||
this.props.onChange(this.state.formattedNumber, this.state.selectedCountry); | ||
this.props.onChange(formattedNumber, selectedCountry); | ||
} | ||
@@ -582,7 +583,9 @@ }); | ||
getFlagStyle: function getFlagStyle() { | ||
return { | ||
width: 16, | ||
height: 11, | ||
backgroundImage: "url(" + this.props.flagsImagePath + ")" | ||
}; | ||
if (this.props.flagsImagePath) { | ||
return { | ||
backgroundImage: "url(" + this.props.flagsImagePath + ")" | ||
}; | ||
} else { | ||
return {}; | ||
} | ||
}, | ||
@@ -589,0 +592,0 @@ handleInputBlur: function handleInputBlur() { |
{ | ||
"name": "react-telephone-input", | ||
"version": "4.5.8", | ||
"version": "4.5.9", | ||
"description": | ||
@@ -5,0 +5,0 @@ "React component for entering and validating international telephone numbers", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74676
2138