react-otp-input
react-otp-input copied to clipboard
Make test id dynamic
-
Describe the Feature Request
- To support overridden test id attribute name
-
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'
The feature is available in: https://www.npmjs.com/package/react18-input-otp
You can now customize the input with v3 and add any props you want