sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
216 stars 82 forks source link

Setting the maxlength on the autocomplete input #87

Closed hadrian625 closed 1 year ago

hadrian625 commented 1 year ago

Would it be possible to set the maxlength property on the html input element? This would be useful for to prevent user to type too many characters when the application would want to get the free entered text by the user as data to be saved. This would eliminate the need to have a maxlength validation

sickdyd commented 1 year ago

@hadrian625 Feature added in the latest version!

sickdyd commented 1 year ago

Forgot to update the docs: use the prop maxLength to define the max length of the input