Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Created May 11, 2019 14:39
Show Gist options
  • Save choudharymanish8585/e52582bbd93028638177019eec7e3cfe to your computer and use it in GitHub Desktop.
Save choudharymanish8585/e52582bbd93028638177019eec7e3cfe to your computer and use it in GitHub Desktop.
<aura:component implements="flexipage:availableForAllPageTypes">
<aura:attribute type="String" name="selectedValue" />
<lightning:card title="AutoComplete Demo">
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12" padding="around-small">
<c:AutoComplete aura:id="account-record" label="Account" objectApiName="Account" idFieldApiName="Id" valueFieldApiName="Name" />
</lightning:layoutItem>
<lightning:layoutItem size="12" padding="around-small">
<lightning:button label="Get Selected Value" variant="brand" onclick="{!c.getSelectedValue}" />
</lightning:layoutItem>
<lightning:layoutItem size="12" padding="around-small">
<lightning:formattedText value="{! 'Selected Option is: '+v.selectedValue}" />
</lightning:layoutItem>
</lightning:layout>
</lightning:card>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment