Hi all first attempt at this aura with nested lwc sorry so may be (hopefully) a simple implementation error.
I have a basic lwc component embedded in an aura component. I know the lwc serverside/apex controller is passing a payload back to the lwc because the debug log shows me the payload clearly just prior to returning it to the lwc. RecordId is being passed into lwc from aura fine. Things get weird at the aura component-lwc interface however - the lwc doesnt treat the payload as I'd expect - it treats payload as 'undefined'. What am I missing here?
the aura markup:
<c:activityTimeline recordId="{!v.recordId}"/>
the activityTimeline lwc markup:
<!-- recordId is being passed in fine... -->
<template if:true={payload} for:each={payload.rows} for:item="row">
<p key={row.rowId}>a row</p> <!-- just want to try to display something! -->
</template>
the lwc js:
import { LightningElement, api, wire } from 'lwc';
import getTimelineData from '@salesforce/apex/ActivityTimelineCC.timelineData';
export default class ActivityTimeline extends LightningElement {
@api recordId;
@api activityDate = "2022-09-26";
payload;
@wire(getTimelineData, {activityDate : '$activityDate',
recordId : '$recordId' })
timeslotData({error,data}){
if(data){
this.payload = data;
// by this point the data is {}, despite the apex debug showing a large payload...
}
if(error){
// no error is being noted here.
}
};