2

I'm trying to run a method in my child component (LWC component) from my parent component (Aura Component) but the method is never run.

Parent (Aura Helper)

    const months = component.find("month");
    for(let i=0; i < months.length; i++){
        months[i].getAllDays();   
    }

Child (Aura)

    @api
    getAllDays(){
        console.log('Check');
    }

The components "month" are found. I can get attributes if I do:

months[i].get("v.myVar");

I can't run exposed functions. Have you any ideas ?

EDIT

The problem is that my parent component initialization is faster than my child component loading and it can't run the function. My syntax is good

2

1 Answer 1

1

The problem is that my parent component initialization is faster than my child component loading and it can't run the function. My syntax is good

You must log in to answer this question.

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