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

4 thoughts on “Custom Lookup Lightning Component

  1. I cannot get this to work. I am trying to use it in a sandbox to lookup accounts and I have entered sample data.

Leave a Reply

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