Skip to content

Commit

Permalink
Provide fullNumber and isValid when onSelectFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienharnay authored Jun 1, 2018
1 parent b788abe commit 5a18a2a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/IntlTelInputApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,15 @@ class IntlTelInputApp extends Component {
typeof this.props.onSelectFlag === 'function') {
const currentNumber = this.state.value;

this.props.onSelectFlag(currentNumber, this.selectedCountryData);
const fullNumber = this.formatFullNumber(currentNumber);
const isValid = this.isValidNumber(fullNumber);

this.props.onSelectFlag(
currentNumber,
this.selectedCountryData,
fullNumber,
isValid,
);
}
});
}
Expand Down

0 comments on commit 5a18a2a

Please sign in to comment.