You need to sign in to do that
Don't have an account?
Amit Singh 1
"Assertion Failed!: \"readonly\" must either be a public property of lightningDualListbox or a global HTML attribute : false"
Hi Folks,
I am getting Error while trying to create Dual List Dynamically using $A.createComponent
"Assertion Failed!: \"readonly\" must either be a public property of lightningDualListbox or a global HTML attribute : false"
Below is my JavaScript code
Any help will be greatly appreciated. Thanks in Advance.
Thanks & Regards,
Amit
I am getting Error while trying to create Dual List Dynamically using $A.createComponent
"Assertion Failed!: \"readonly\" must either be a public property of lightningDualListbox or a global HTML attribute : false"
Below is my JavaScript code
doInit : function(component, event, helper) { var options = [ { value: "1", label: "Option 1" }, { value: "2", label: "Option 2" }, { value: "3", label: "Option 3" }, { value: "4", label: "Option 4" }, { value: "5", label: "Option 5" }, { value: "6", label: "Option 6" }, { value: "7", label: "Option 7" }, { value: "8", label: "Option 8" }, ]; $A.createComponent( "lightning:dualListbox", { "aura:id": "findableAuraId", "label": "Dual List Demo", "selectedLabel":"Selected Options", "sourceLabel":"Available Options", "options" : options }, function(dualList, status, errorMessage){ //Add the new button to the body array if (status === "SUCCESS") { var body = component.get("v.body"); body.push(dualList); component.set("v.body", body); } else if (status === "INCOMPLETE") { console.log("No response from server or client is offline."+ JSON.stringify(errorMessage)) } else if (status === "ERROR") { console.log( JSON.stringify(errorMessage)); } } ); }
Any help will be greatly appreciated. Thanks in Advance.
Thanks & Regards,
Amit
alternatively, you can use aura:if