react icon indicating copy to clipboard operation
react copied to clipboard

[BUG] Multiple input masks

Open elliott-w opened this issue 5 years ago • 1 comments

When you select and then deselect the "Allow multiple masks" on a component in the form builder, it adds the following json to the component:

"allowMultipleMasks": false,
"inputMasks": [
  {
    "mask": "",
    "label": ""
  }
]

However react-formio still checks through the inputMasks list and throws: Error: The 'value' provided to Text Mask needs to be a string or a number. The value received was: {}

EDIT: This error happens on the Phone Number component. However, when using a normal Text Field component, the field gets pre-filled with a default value of [object Object], but no error gets thrown.

Environment

  • Hosting type: Form.io
  • Front-end: react-formio v4.3.0
  • Browser: Chrome v83.0.4103.97

elliott-w avatar Jun 15 '20 06:06 elliott-w

Temporary fix is to delete and re-add that component in the form builder

elliott-w avatar Jun 15 '20 06:06 elliott-w

I am closing the issue as it was created too long ago and there are no new comments here. I hope it was resolved. If not, please reopen it. Thanks!

TanyaGashtold avatar Aug 31 '23 13:08 TanyaGashtold