imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

Pattern mask does not mask on component mount in React

Open dludemann opened this issue 4 months ago • 0 comments

Describe the bug Pattern mask does not mask on component mount in react. Codesandbox was a forked example from another discussion

To Reproduce Codesandbox

Expected behavior an input of "20000" should render "$20,000" based on mask. But it renders "20,000".

Mask Used

{
    mask: "$num",
    blocks: {
      num: {
        mask: Number,
        thousandsSeparator: ",",
        radix: ".",
        mapToRadix: ["."],
        scale: 2, // two decimal places
        expose: true,
      },
    },
  }

dludemann avatar Aug 20 '25 02:08 dludemann