Closed shinrox closed 2 years ago
I just published version 2.0 See examples in tests, readme or storybook: https://github.com/antoniopresto/antd-mask-input/blob/master/stories/input.stories.tsx
@shinrox Were you able to use the mask for CPF and CNPJ? I've been having this problem for days and I can't do it at all?
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
Summary First of all, thanks for the lib =)
Currently, the behavior of adding a maxLength prop to the field based on the mask length, breaks the possibility of having dynamic masks in the same input
Especially for Brazilian forms, we have some fields in which the length and mask might vary, and it makes it impossible to do something close to this, or like masking a common document input type that we use, which the length vary from 11 to 18 chars and the masks are completely different (
999.999.99-99
and99.999.999/9999-99
)I think this is not the same as an optional character, but a completely different expected value and mask in the same field
We thought about the approach of using a
select
option so the user define the type of the document and we go from there, but this is actually a not expected behavior from a mask, so I'm calling it a bug, feel free to change it if you like ;)