Skip to content

Lightning Component that renders lightning:select with options from an sobject picklist field.

License

Notifications You must be signed in to change notification settings

sevem/sfdc-lightning-picklist-field-component

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightning Picklist Field Select Component

Lightning Component that renders lightning:select with options from an sobject picklist field. Ideally, this component shouldn't be needed but as of Winter '16 release the force:inputField component has a bug that when used with picklist fields it renders disabled. Disabled form fields are not conducive to users entering data.

Deploy to Salesforce

screenshot

Usage

The simplest way is to use the component and specify objectName and fieldName required attributes:

<c:PicklistSelect objectName="Account" fieldName="Type"/>

Since the standard lightning:select component is used by this component, most of the standard attributes are available to you as well:

Attribute Description Required?
objectName API name of object yes
fieldName API name of picklist field yes
label Text that describes the desired select input. Default is the field's label. no
value The value of the select, also used as the default value to select the right option during init. If no value is provided, the first option will be selected. no
class A CSS class that will be applied to the outer element. This style is in addition to base classes associated with the component. no
onblur The action triggered when the element releases focus. no
onfocus The action triggered when the element receives focus. no
onchange The action triggered when a value attribute changes. no

About

Lightning Component that renders lightning:select with options from an sobject picklist field.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Apex 56.1%
  • JavaScript 43.9%