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

Component select field
I'm trying to display a select list of values from a field on one of my attributes. I have been able to display them, however, I was wondering if there was an easy way to eliminate the duplicates.
The attribute is <aura:attribute name="groupstructures" type="Group_Structure__c[]"/>
The section of code for the selection is
The attribute is <aura:attribute name="groupstructures" type="Group_Structure__c[]"/>
The section of code for the selection is
<lightning:layoutItem padding="horizontal-medium" size="4"> <!-- TEST Create a dropdown menu with options for Section code--> <lightning:select aura:id="selectSection" label="Section" name="sourceSection" > <aura:iteration items="{!v.groupstructures}" var="gs"> <option value="{!gs.id}">{!gs.Section_Code__c}</option> </aura:iteration> </lightning:select> </lightning:layoutItem>
Yes .. Add it at the JS controller level .. .
OR add default record
All Answers
As You cannt return the Set from the @AuraEnabled methods .. you can create a set and then convert to list as shonw below
Fred
Yes .. Add it at the JS controller level .. .
OR add default record
Awesome! thanks again for all of your help!
Fred