/
inputLookup.cmp
29 lines (25 loc) · 1.42 KB
/
inputLookup.cmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!--
Author: Enrico Murru (http://enree.co, @enreeco)
-->
<aura:component controller="InputLookupAuraController">
<ltng:require scripts="/resource/Lgt_InputLookup/js/jquery-2.2.4.min.js,
/resource/Lgt_InputLookup/js/bootstrap.min.js,
/resource/typeahead"
styles="/resource/Lgt_InputLookup/css/bootstrap.min.css"
afterScriptsLoaded="{!c.initTypeahead}" />
<aura:registerEvent name="inputLookupEvent" type="c:InputLookupEvt" />
<aura:handler name="inputLookupEvent" action="{!c.handleInputLookupEvt}"/>
<aura:attribute name="type" type="String" description="Sobject Type" required="true"/>
<aura:attribute name="value" type="String" description="Source / Destination value" />
<aura:attribute name="className" type="String" description="class name of the input object" />
<!-- PRIVATE ATTRS -->
<aura:attribute name="nameValue" type="String" description="Name of the current lookup 'name' field: loaded by controller"
access="PUBLIC"/>
<aura:attribute name="isLoading" type="Boolean" description="Loading component" default="true"
access="PRIVATE"/>
<div class="has-feedback">
<input id="{!globalId+'_typeahead'}" type="text" class="{!v.className}"
readonly="{!v.isLoading}" />
<span class="glyphicon glyphicon-search form-control-feedback"></span>
</div>
</aura:component>