Activity Forums Salesforce® Discussions What is find method in lightning component in Salesforce?

  • Kirandeep

    Member
    May 29, 2020 at 3:03 pm

    Use aura:id to add a local ID of button1 to the lightning:button component. You can find the component by calling cmp. find("button1") , where cmp is a reference to the component containing the button. The find() function has one parameter, which is the local ID of a component within the markup.

  • Shweta

    Member
    May 29, 2020 at 3:35 pm

    component.find() : returns the Aura.Component instance by its local ID. If the Aura.component local ID is unique, it returns the component, and if there are multiple Aura.component with the same local ID, it returns an array of the components.
    Syntax: component.find("auraid");

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos