You need to sign in to do that
Don't have an account?

preset selected values for lightning:dualListbox
How can I get lightning:dualListbox to show preselected list of values? I've tried what I've seen on developer's blogs but for some reason my right list is always empty. (API v.43)
<aura:attribute name="countryOptions" type="List" default="[ { label: 'United Kingdom', value: 'GB' }, { label: 'Netherlands', value: 'NL' }]"/> <aura:attribute name="existingValues" type="List" default="[ {label: 'United Kingdom', value: 'GB' }]" /> <lightning:dualListbox label= "Select Country" sourceLabel="Available" selectedLabel="Selected" options="{!v.countryOptions}" value="{!v.existingValues}"/>
<aura:attribute name="existingValues" type="List" default="['United Kingdom','GB' ]" />
now this should work fine..