0
<div class="slds-form-element">
     <div class="slds-form-element__control">
         <ui:inputText aura:id="groupType"
                 label="group Type"
                 class="slds-select"
                 Option="Standard"
                 labelClass="slds-form-element__label"
                 value="{!v.groupType.Name}"
                 required="true"/>
    </div>
</div>

Here I should be able select one option from the list of avaialble options, the options are standard, medium, complex

2

1 Answer 1

1

You have to use <ui:inputSelect>, attribute options present

below is the documentation for <ui:inputSelect>

<aura:component implements="force:appHostable">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
        <ui:inputSelect label="Status" class="dynamic" aura:id="InputSelectDynamic"/>
</aura:component>

JS

({
    doInit : function(cmp) {
        var opts = [{ class: "optionClass", label: "Open", value: "Open"},
                               { class: "optionClass", label: "Completed", value: "Completed" },
                                { class: "optionClass", label: "Open&Completed", value: "Open&Completed" },
                              ];  
        cmp.find("InputSelectDynamic").set("v.options", opts);
    }
})

http://documentation.auraframework.org/auradocs#reference?descriptor=ui:inputSelect&defType=component

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .