Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,30 +958,6 @@ class PhoneInput extends React.Component {
onKeyDown={this.handleKeydown}>
{specialLabel && <div className='special-label'>{specialLabel}</div>}
{errorMessage && <div className='invalid-number-message'>{errorMessage}</div>}
<input
className={inputClasses}
style={this.props.inputStyle}
onChange={this.handleInput}
onClick={this.handleInputClick}
onDoubleClick={this.handleDoubleClick}
onFocus={this.handleInputFocus}
onBlur={this.handleInputBlur}
onCopy={this.handleInputCopy}
value={formattedNumber}
onKeyDown={this.handleInputKeyDown}
placeholder={this.props.placeholder}
disabled={this.props.disabled}
type='tel'
{...this.props.inputProps}
ref={el => {
this.numberInputRef = el;
if (typeof this.props.inputProps.ref === 'function') {
this.props.inputProps.ref(el);
} else if (typeof this.props.inputProps.ref === 'object') {
this.props.inputProps.ref.current = el;
}
}}
/>

<div
className={flagViewClasses}
Expand All @@ -1007,6 +983,30 @@ class PhoneInput extends React.Component {

{showDropdown && this.getCountryDropdownList()}
</div>
<input
className={inputClasses}
style={this.props.inputStyle}
onChange={this.handleInput}
onClick={this.handleInputClick}
onDoubleClick={this.handleDoubleClick}
onFocus={this.handleInputFocus}
onBlur={this.handleInputBlur}
onCopy={this.handleInputCopy}
value={formattedNumber}
onKeyDown={this.handleInputKeyDown}
placeholder={this.props.placeholder}
disabled={this.props.disabled}
type='tel'
{...this.props.inputProps}
ref={el => {
this.numberInputRef = el;
if (typeof this.props.inputProps.ref === 'function') {
this.props.inputProps.ref(el);
} else if (typeof this.props.inputProps.ref === 'object') {
this.props.inputProps.ref.current = el;
}
}}
/>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/style/high-res.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
background-color: #f5f5f5;
border: 1px solid #cacaca;
border-radius: 3px 0 0 3px;
z-index: 1;
&:hover, &:focus {
cursor: pointer;
}
Expand Down
1 change: 1 addition & 0 deletions src/style/material.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
bottom: 0;
padding: 0;
border-radius: 3px 0 0 3px;
z-index: 1;
&:hover, &:focus {
cursor: pointer;
}
Expand Down
1 change: 1 addition & 0 deletions src/style/semantic-ui.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
background-color: #f5f5f5;
border: 1px solid #cacaca;
border-radius: 3px 0 0 3px;
z-index: 1;
&:hover, &:focus {
cursor: pointer;
}
Expand Down
1 change: 1 addition & 0 deletions src/style/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
background-color: #f5f5f5;
border: 1px solid #cacaca;
border-radius: 3px 0 0 3px;
z-index: 1;
&:hover, &:focus {
cursor: pointer;
}
Expand Down