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

Cannot use conditional disabled if inputStyle is used for styling

Open jeffreyzhen opened this issue 7 years ago • 0 comments

For my use case, I wanted to have the component become disabled when the user has reached the maximum number of fields (in handlePinInputChange when length === 6, pinComplete in state is updated from false to true).

screen shot 2018-10-08 at 7 43 11 pm

If this is used in conjunction with inputStyle, an error is thrown in the client: screen shot 2018-10-08 at 7 39 20 pm

The code works fine when inputStyle is not used. I believe the solution would be to allow inputStyle to have styles added on (incorporating a spread operator to adding the styles).

jeffreyzhen avatar Oct 08 '18 23:10 jeffreyzhen