[BUG] : Show/hide based on condition causing wysiwyg editor initialized multiple times
I have tried that https://formio.github.io/formio.js/app/builder here.
Created radio button yes and no. and based on yes/no showing textarea and WYSIWYG editor. When you switch multiple times it causing multiple time initialized.
Here is my form JSON to replicate,
{
"display": "form",
"components": [
{
"label": "Show",
"optionsLabelPosition": "right",
"values": [
{
"label": "yes",
"value": "yes",
"shortcut": ""
},
{
"label": "no",
"value": "no",
"shortcut": ""
}
],
"inline": false,
"mask": false,
"tableView": true,
"alwaysEnabled": false,
"type": "radio",
"input": true,
"key": "show",
"defaultValue": "",
"validate": {
"customMessage": "",
"json": ""
},
"conditional": {
"show": "",
"when": "",
"json": ""
},
"customConditional": "",
"properties": {},
"reorder": false,
"encrypted": false,
"logic": [],
"attributes": {}
},
{
"label": "Detailed Description",
"editor": "quill",
"isUploadEnabled": false,
"showWordCount": false,
"showCharCount": false,
"tableView": true,
"alwaysEnabled": false,
"as": "string",
"wysiwyg": {
"theme": "snow",
"placeholder": "",
"modules": {
"clipboard": {
"matchVisual": false
},
"toolbar": [
[
{
"size": [
"small",
false,
"large",
"huge"
]
}
],
[
{
"header": [
1,
2,
3,
4,
5,
6,
false
]
}
],
[
{
"font": []
}
],
[
"bold",
"italic",
"underline",
"strike",
{
"script": "sub"
},
{
"script": "super"
},
"clean"
],
[
{
"color": []
},
{
"background": []
}
],
[
{
"list": "ordered"
},
{
"list": "bullet"
},
{
"indent": "-1"
},
{
"indent": "+1"
},
{
"align": []
}
],
[
"blockquote",
"code-block"
],
[
"link",
"image",
"video",
"formula",
"source"
]
]
}
},
"type": "textarea",
"input": true,
"key": "textArea2",
"validate": {
"customMessage": "",
"json": ""
},
"conditional": {
"show": "true",
"when": "show",
"eq": "yes",
"json": ""
},
"defaultValue": "",
"inputFormat": "plain",
"encrypted": false,
"properties": {},
"customConditional": "",
"logic": [],
"attributes": {},
"autoExpand": false,
"uploadUrl": "",
"uploadOptions": "",
"uploadDir": "",
"reorder": false
},
{
"label": "Normal description",
"autoExpand": false,
"isUploadEnabled": false,
"showWordCount": false,
"showCharCount": false,
"tableView": true,
"alwaysEnabled": false,
"type": "textarea",
"input": true,
"key": "textArea3",
"defaultValue": "",
"validate": {
"customMessage": "",
"json": ""
},
"conditional": {
"show": "true",
"when": "show",
"eq": "no",
"json": ""
},
"properties": {},
"customConditional": "",
"inputFormat": "plain",
"encrypted": false,
"logic": [],
"attributes": {},
"uploadUrl": "",
"uploadOptions": "",
"uploadDir": "",
"reorder": false
},
{
"type": "button",
"label": "Submit",
"key": "submit",
"disableOnInvalid": true,
"theme": "primary",
"input": true,
"tableView": true
}
],
"settings": {
"pdf": {
"id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0",
"src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0"
}
}
}
Hi @travist any update or solution on this i'm also facing the same issue?
@Inaamhusain Can you very what version of our renderer you are utilizing? This should be fixed in our 4x branch.
@jhen1422 Looks like its working fine with version 4.0.0-rc.4. Thanks for the update.