Closed luketurner-casumo closed 7 months ago
Updating the code to something like this should do the job 😄
const validInputElements = ['text', 'search', 'tel', 'url', 'email', 'password'];
const validInputElement = (inputElement: HTMLInputElement | null) =>
inputElement !== null && validInputElements.includes(inputElement.type);
https://github.com/GoncharukBro/react-input/assets/106586112/b0d79a98-388d-4920-88ae-c61d2f9d4026
Just to test my theory I have locally removed these checks and everything works perfectly with input type search
😄
Thanks for the suggestion, we are considering the possibility of supporting other types for consistency with libraries that require this. We will include this fix in the next release.
Thanks for the suggestion, we are considering the possibility of supporting other types for consistency with libraries that require this. We will include this fix in the next release.
Brilliant thank you! Do you possibly have an idea when this next release will drop?
Hello, install the new version:
npm i @react-input/mask@latest
It includes support for the following types: “text”, “email”, “phone”, “search”, “url”. The "password" type is not included because by masking every character in the value, including mask characters, this type of input can be confusing to users.
Hi I am looking to integrate your masking library into our codebase. However I have run into an issue where your checks are too strict and require
inputElement.type === 'text'
. validInputCheck Would it be possible to expand the scope of this check to allow for other input element types such assearch
etc? I see no reason why this check needs to be so strict 🤔 Is this something that can be resolved?