Skip to content

Commit

Permalink
Merge 9249b76 into b01621f
Browse files Browse the repository at this point in the history
  • Loading branch information
nutboltu committed Feb 12, 2019
2 parents b01621f + 9249b76 commit e13252e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/IntlTelInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ class IntlTelInput extends Component {
) {
this.updatePlaceholder(this.props);
}

if (this.props.allowDropdown !== prevProps.allowDropdown) {
this.allowDropdown = this.props.allowDropdown;
}
}

componentWillUnmount() {
Expand Down Expand Up @@ -997,7 +1001,6 @@ class IntlTelInput extends Component {
};

generateMarkup = () => {
this.wrapperClass['allow-dropdown'] = this.allowDropdown;
this.wrapperClass['separate-dial-code'] = this.props.separateDialCode;

if (this.isMobile && this.props.useMobileFullscreenDropdown) {
Expand Down Expand Up @@ -1249,6 +1252,7 @@ class IntlTelInput extends Component {
const inputClass = this.props.inputClassName;
const wrapperStyle = Object.assign({}, this.props.style || {});

this.wrapperClass['allow-dropdown'] = this.allowDropdown;
this.wrapperClass.expanded = this.state.showDropdown;

const wrapperClass = classNames(this.wrapperClass);
Expand Down

0 comments on commit e13252e

Please sign in to comment.