Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component controller="AutoSearchController">
- <aura:attribute name="sObject" required="true" type="String" default="" description="Name of the sObject that will be filtered" />
- <aura:attribute name="fields" type="String" default="" description="List of fields to get with each record"/>
- <aura:attribute name="limit" type="Integer" default="10" description="Limits the number of sObjects returned to this value" />
- <aura:attribute name="queryFields" required="true" type="String" default="" description="Field used to filter the records" />
- <aura:attribute name="displayFields" required="false" type="String" default="" description="Field used to show on dropdown" />
- <aura:attribute name="placeHolder" required="false" type="String" default="" description="placeholder for search text" />
- <aura:attribute name="isExternalTable" type="boolean" default="false" description="its an boolean to specify for the external table" />
- <aura:attribute name="externalSObjType" type="String" description="Name of the sObject that will be filtered" />
- <aura:attribute name="externalFields" type="String[]" default="" description="List of fields to get with each record"/>
- <aura:attribute name="conditionString" type="String" description="Extra filter condition to query for autocomplete" default=""/>
- <aura:attribute name="wildCardSearch" type="boolean" description="To perform wildcard search" default="false"/>
- <aura:registerEvent name="autoSearchEvent" type="c:AutoSearchEvent"/>
- <aura:attribute name="result" type="object[]" default="[]"/>
- <aura:attribute name="selectedName" type="String" default=""/>
- <div class="container">
- <ui:inputText aura:id="autocomplete" value='{!v.selectedName}' placeholder="{!v.placeHolder}"
- class="slds-lookup__search-input slds-input" keyup="{!c.getSuggestions}" updateOn="keyup" />
- <ul aura:id="items" class="item-list toggle" >
- <aura:iteration items="{!v.result}" var="value">
- <li class="item" onclick="{!c.fireClickEvent}" >{!value}</li>
- </aura:iteration>
- </ul>
- </div>
- </aura:component>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement