add maxlength attribute to input to accept maxLength prop#108
add maxlength attribute to input to accept maxLength prop#108chiester wants to merge 1 commit intofurqanZafar:masterfrom
Conversation
3a7c3ea to
98e3c8c
Compare
|
Any chance this'll get merged @furqanZafar? It's a useful attr and the PR is pretty straightforward. |
| # class-name :: String | ||
| delimiters: [] | ||
| disabled: false | ||
| maxLength: 255 |
There was a problem hiding this comment.
Why make a default limit? this is not backward compatible (i.e. Some usages may need more than 255 characters).
There was a problem hiding this comment.
Can't you just override the default? maxLength=1024 , or whatever
There was a problem hiding this comment.
You didn't understand me. If I were to use this library and happen to have values with more than 255 characters, upgrading to the version with your feature would break my code unless I specify the maxLength prop. It usually a better practice to make new features "opt-in", meaning not enforcing it unless wanted, and upgrading should not force you to make changes in your code.
There was a problem hiding this comment.
Thanks for the clarification. That's a good point.
|
With the PR I did (#160) it will be solved by passing |
Added the ability to pass a maxLength attribute so the length of the input in SimpleSelect can be limited.