croz-ltd / tiller

🔖 Tiller DS is an open-source UI library that provides a range of visual, functional components and patterns that speed up design and development.
https://croz-ltd.github.io/tiller
Apache License 2.0
28 stars 1 forks source link

MaskedInputField doesn't support double characters #151

Open ekus2 opened 11 months ago

ekus2 commented 11 months ago

Basic information

Bug description

Our masked field needs to have constant number at the beginning and at the end of the value for example 1____5. But when trying to add second number that is the same value as first one (1) it won't enter it.

image

Steps to reproduce

<MaskedInputField mask={["1", /\d/, /\d/, /\d/, /\d/, /\d/, "5"]} name="number" />

this is the input field we used and here that bug occurs when trying to write 1111115.

ivam5 commented 11 months ago

We currently believe that the problem lies within the external library being used, specifically text-mask. We have attempted to address the issue using their add-ons; however, a similar bug has already been reported here: https://github.com/text-mask/text-mask/issues/1010. Additionally, we tried implementing a new library - https://www.npmjs.com/package/react-imask. However, we would need to extend the API. We'll have to dedicate additional time to this issue.