0

this is my code here:

handleKeyUpOnNewRecipient : function(component, event, helper, recipient){
    component.set("v.recipients", _.unionBy(component.get("v.recipients"), [recipient], 'id'));
    component.set("v.inputKeyword", '');
},

Call of this function from controller:

doInit : function(component, event, helper) {
    component.set("v.searchEmail", {
        onValueChange: helper.handleKeyUpOnNewRecipient,
        lookupAPI: component.get("c.searchEmail"),
        component: component, event: event, helper: helper
    })
},

I don't understand what the fourth 'recipient' is that we are passing to handleKeyUpOnNewRecipient which is a method in helper class. Could anyone tell me?

3
  • Hi, could you add call of this func from controller?
    – Pavlo M
    Commented Sep 2, 2022 at 9:29
  • 4th parameter is not part of aura framework, might be added by other developer.
    – Raul
    Commented Sep 2, 2022 at 9:29
  • yes @PavloM, I have edited the question to add the call of this function now.
    – goel123
    Commented Sep 2, 2022 at 9:37

1 Answer 1

0

The method is a helper method, which means the parameters are set by the component calling the method. You should have a component somewhere that has an attribute like:

<aura:attribute name="searchEmail" type="Object" access="public" />

Which will then try to call the method as:

component.get("v.searchEmail").onValueChange(component, event, helper, recipient);

The specifics may differ somewhat, but I believe that finding v.searchEmail in your code base should find what the parameter is supposed to be.

We can't tell you much beyond that from the code you've provided here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .