Custom Lookup Lightning Component

Lookups are very important components in Salesforce. Salesforce vide inputfield to handle the Lookup component out of the box. But they come with there own set of limitations. So today I have created a basic Lookup Lightning Component which we can easily use with our existing apps or component to make it work.

Lookup.gif

I tried to keep this component as simple as possible so I did not use any event to communicate data between component. Instead we have used two way binding to pass data between component. Also we have not used any third party library and only SLDS is used. So it will work in Locker service and can pass security review as well.

Here is the complete code.

 

Now this component support Dynamic Icon , Required, Dynamic Label. I will also add many other feature in this component to make it more better. You can also download complete code from Github repo as well.

Did you like this component or want to add any feature, report any bug. Just let me know in comments section. Happy Programming :).

 

Advertisements

3 thoughts on “Custom Lookup Lightning Component

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.