react-intl-tel-input
react-intl-tel-input copied to clipboard
TabIndex property not being applied to input control
trafficstars
I'm attempting to set the tabIndex value on the input control, but it's not happening. Can confirm when examining the input element in Chrome debugger, no tabInput value is present.
Here is the code I'm using to try and add the attribute: <IntlTelInput name={name} onlyCountries={['us', 'ca', 'gb']} containerClassName={['intl-tel-input']} inputClassName={['form-control']} value={value} onPhoneNumberChange={onChange} disabled={disabled} tabIndex={tabOrder} // in this case, the number 4 />
Every thing else works fine, just not tabIndex
Thanks, James
Please use telInputProps as below
<IntlTelInput
name={name}
onlyCountries={['us', 'ca', 'gb']}
containerClassName={'intl-tel-input'}
inputClassName={['form-control']}
value={value}
onPhoneNumberChange={onChange}
disabled={disabled}
telInputProps={{tabIndex: 1}}
/>