surveyjs/custom-widgets

Inputmask works incorrectly in react survey widgets

stsiushkevich opened this issue · 2 comments

When I input 1.2345 then I get 123.45 after clearing a focus.

There is an example:

https://codesandbox.io/s/jovial-andras-768jm?file=/src/SurveyComponent.jsx

I'll take a look

I think you need to use the autoUnmask: false,:

        {
          type: "text",
          inputMask: "9[9][9][.9{*}]",
          autoUnmask: false,
          title: "Decimal:"
        }

Here is your updated code sandbox sample - https://codesandbox.io/s/fervent-nash-hvb5j?file=/src/SurveyComponent.jsx:510-650