[BUG] Unable to edit item inside column
Environment
Please provide as many details as you can:
- Hosting type
- [] Form.io
- [x ] Local deployment
- Version: Only using form builder with our custom framework
- Formio.js version: 4.10
- Frontend framework: Bootstrap 3
- Browser: Chrome (Mac)
- Browser version: 83.0.4103.97
Steps to Reproduce
- Create a form with a column component (default of 2 columns is fine)
- Drag a new element (text field in our case) in it and click save.
- Click gear icon for new element and try to change something (label for us - trying to change text) and click save.
Expected behavior
Should close modal window and new changes should be showing in form with no javascript error.
Observed behavior
Modal window closes and shows the component (text field) as it was prior to the edit. There is a javascript error that says, "Uncaught TypeError: Cannot read property '0' of undefined"
I can drag that same component out of the column, make an edit with gear icon, then drag it back into the column. I just cannot make the edit to the component directly inside the column.
Example
If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.
For code or form JSON, please enclose in a code block:
https://jsfiddle.net/nz1bur7c/
Our very simple JSON example is here and a jsfiddle is above showing the problem
{
"components": [
{
"label": "Before selecting your MOOD (COLOR), is there anything you would like to communicate to your peers?",
"labelPosition": "left-left",
"optionsLabelPosition": "right",
"inline": true,
"tableView": false,
"defaultValue": "no",
"values": [
{
"label": "Yes",
"value": "yes",
"shortcut": ""
},
{
"label": "No",
"value": "no",
"shortcut": ""
}
],
"key": "beforeSelectingYourMoodColorIsThereAnythingYouWouldLikeToCommunicateToYourPeers",
"type": "radio",
"labelWidth": 50,
"input": true
},
{
"label": "Columns",
"columns": [
{
"components": [
{
"label": "Text Field 4",
"tableView": true,
"key": "textField4",
"type": "textfield",
"input": true,
"hideOnChildrenHidden": false
},
{
"input": true,
"key": "textField",
"tableView": true,
"label": "Text Field",
"type": "textfield",
"hideOnChildrenHidden": false
}
],
"width": 6,
"offset": 0,
"push": 0,
"pull": 0,
"size": "md"
},
{
"components": [],
"width": 6,
"offset": 0,
"push": 0,
"pull": 0,
"size": "md"
}
],
"tableView": false,
"key": "columns",
"type": "columns",
"input": false
},
{
"label": "Communication",
"placeholder": "text entry",
"autoExpand": false,
"tableView": true,
"key": "communication",
"conditional": {
"show": true,
"when": "beforeSelectingYourMoodColorIsThereAnythingYouWouldLikeToCommunicateToYourPeers",
"eq": "yes"
},
"type": "textarea",
"input": true
},
{
"type": "button",
"label": "Submit",
"key": "submit",
"disableOnInvalid": true,
"input": true,
"tableView": false
}
]
}
Hello @ProteanHub thank you for reaching out! We are able to replicate this issue and have created a ticket for this issue. For reference, the ticket number is FJS-1004.
We will let you know once this issue is resolved.
Thanks, appreciate all your hard work with formio!
We will have someone fix this as a top priority since it is a bad regression.
Fixed in latest version.