There was an error while loading. Please reload this page.
1 parent 9deb73a commit 2810badCopy full SHA for 2810bad
src/index.js
@@ -950,12 +950,19 @@ class PhoneInput extends React.Component {
950
onBlur={this.handleInputBlur}
951
onCopy={this.handleInputCopy}
952
value={formattedNumber}
953
- ref={el => this.numberInputRef = el}
954
onKeyDown={this.handleInputKeyDown}
955
placeholder={this.props.placeholder}
956
disabled={this.props.disabled}
957
type='tel'
958
{...this.props.inputProps}
+ ref={el => {
959
+ this.numberInputRef = el;
960
+ if (typeof this.props.inputProps.ref === 'function') {
961
+ this.props.inputProps.ref(el);
962
+ } else if (typeof this.props.inputProps.ref === 'object') {
963
+ this.props.inputProps.ref.current = el;
964
+ }
965
+ }}
966
/>
967
968
<div
0 commit comments