Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-telephone-input

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-telephone-input - npm Package Compare versions

Comparing version 4.5.8 to 4.5.9

17

es/ReactTelephoneInput.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc