react-otp-input icon indicating copy to clipboard operation
react-otp-input copied to clipboard

Make test id dynamic

Open carryall opened this issue 4 years ago • 1 comments

  • Describe the Feature Request

  • Describe Preferred Solution provide another attribute for custom test attributes

    <OtpInput value={otp} onChange={onOTPChange} numInputs={4} testIds={ { data-test: 'input-otp' } } />
    

    then the test attribute added to the input like data-test='input-otp-0', data-test='input-otp-1', data-test='input-otp-2', data-test='input-otp-3'

carryall avatar Nov 17 '21 12:11 carryall

The feature is available in: https://www.npmjs.com/package/react18-input-otp

ritikbanger avatar Aug 09 '22 17:08 ritikbanger

You can now customize the input with v3 and add any props you want

prateek3255 avatar Mar 25 '23 14:03 prateek3255