Activity Forums Salesforce® Discussions What is lightning:combobox ?

  • Nikita

    Member
    August 19, 2019 at 2:09 pm

    lightning:combobox is an input element that enables single selection from a list of options. The result of the selection is displayed as the value of the input.

    This component inherits styling from combobox in the Lightning Design System.

    This example creates a list of options during init with a default selection.

    <aura:component>
    <aura:attribute name="statusOptions" type="List" default="[]"/>
    <aura:handler name="init" value="{! this }" action="{! c.loadOptions }"/>
    <lightning:combobox aura:id="selectItem" name="status" label="Status"
    placeholder="Choose Status"
    value="new"
    onchange="{!c.handleOptionSelected}"
    options="{!v.statusOptions}"/>
    </aura:component>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos