You need to sign in to do that
Don't have an account?
Sparky Jane
lightning:select Not displaying values in drop down
Hey There,
I'm creating a lightning:select component dynamically from the JS and the component JSON is built perfectly like below:
The picklist got created as below. But with empty dropdown.
Can some one please help with this.
Thanks in advance.
I'm creating a lightning:select component dynamically from the JS and the component JSON is built perfectly like below:
["lightning:select", { "label": "Industry", "required": true, "value": {}, "fieldPath": "Industry", "aura:id": "Industry", "options": [{ "value": "--None--", "label": "--None--" }, { "value": "A", "label": "A" }, { "value": "B", "label": "B" }] }], $A.createComponents(JSONString, function(cmps) { cmp.set('v.body', cmps); });
The picklist got created as below. But with empty dropdown.
Can some one please help with this.
Thanks in advance.
$A.createComponents(
[
[
"lightning:select", { label: "Select List", name: "list1"}
],
[
"option", { value: "Option 1", label: "Option 1" }
],
[
"option", { value: "Option 2", label: "Option 2" }
]
],
I have options more than 56 values. Can you sugest with a sample code to ierate options from JS. Because, I need lightning:select to be created dynamically along with options from JS.
Thanks in advance