项目作者: SFXD

项目描述 :
Lightning/Aura component to for input lookup fields
高级语言: Apex
项目地址: git://github.com/SFXD/input-lookup.git
创建时间: 2017-07-13T16:57:58Z
项目社区:https://github.com/SFXD/input-lookup

开源协议:MIT License

下载


This is a simple lightning component designed to do lookups on a particular field.

Use

The component is intended to be used within another component and is designed to take a reference from the parent component to store it’s selectedRecord value. This allows you to use more than one of the inputs in a component. By default the component searchs Name fields of the objects specified.

  1. <aura:component>
  2. <aura:attribute name="selectedRecord" type="Object"></aura:attribute>
  3. <c:InputLookupComponent selectedRecord="{!v.selectedRecord}" label="Search" objectTypes="['User','Group']"></c:InputLookupComponent>
  4. </aura:component>

Attributes

  • selectedRecord: This is a reference to a view attribute in the parent component.
  • objectTypes: The API names of the objects you want to the component to search across. This is a string array [‘User’, ‘Account’]
  • label: the label to be displayed for the the input field
  • placeholder: the placeholder value for the input field