react-intl-tel-input icon indicating copy to clipboard operation
react-intl-tel-input copied to clipboard

TabIndex property not being applied to input control

Open JamesBender opened this issue 6 years ago • 1 comments
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

JamesBender avatar Mar 05 '19 22:03 JamesBender

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}}
/>

nutboltu avatar Mar 06 '19 12:03 nutboltu