Hello,
I develop a parent LWC which calls a method from a child LWC.
Unfortunately, I get this error message:
this.template.querySelector(...).handleUpdateCase().then is not a function
This is the parent LWC:
this.template.querySelector('c-ricba_-q-m_-send-s-m-s').handleUpdateCase()
.then((data) => {
})
.catch(error => {
})
.finally(() => {
})
The child LWC (ricba_QM_SendSMS):
@api
handleUpdateCase() {
console.log('Hello');
return {
ticketId: this.ticketId,
message: this.message
};
}
I would like to understand why the method "then" is not a function please (the child LWC is in the HTML file in the parent LWC)? Maybe the error is from something else? I know the child method is called because if I can read the "console.log" in the developer console of the browser.
Thanks