soywod / react-pin-field

📟 React component for entering PIN codes.
https://soywod.github.io/react-pin-field/
MIT License
412 stars 24 forks source link

debug prop should not be pass to input element #57

Closed luckyxhu closed 2 years ago

luckyxhu commented 2 years ago

the prop debug is only for ReactPinField, pass to input element will cause warning:

Warning: Received `false` for a non-boolean attribute `debug`.

If you want to write it to the DOM, pass a string instead: debug="false" or debug={value.toString()}.

If you used to conditionally omit it with debug={condition && value}, pass debug={condition ? value : undefined} instead.
    at input
    at http://localhost:3333/static/js/bundle.js:182130:59
    at div

currently we can pass undefined to debug to prevent this warning, but debug={undefined} look unlike what it should be.

soywod commented 2 years ago

Which version do you use?

luckyxhu commented 2 years ago

react-pin-field 3.0.11 react 18

soywod commented 2 years ago

The debug mode has been removed in the v3.0.12 (because of its unnecessary complexity), the error should be fixed!