I have an lwc action button that loads the popup. When i load the component for first time, recordId is present. But when i close and open it again(without reloading the whole page), recordId is lost. Kindly advise
export default class EmeaSubmitEvalRequest extends LightningElement {
_recordId;
@api set recordId(value) {
this._recordId = value;
console.log('in setter',this._recordId);
}
get recordId() {
return this._recordId;
}
constructor(){
super();
console.log('constrcu',this.recordId);//not printed at all
}
connectedCallback(){
console.log('connected recid',this.recordId);//not printed at all
}
@wire(invokeMuleService)
getDropdownOptions({error,data}){
if(data){
this.defaultValues();
}
}
@wire(fetchExistingValues,{'evalId':'$recordId'}) preLoadValues({error,data}){
//do some logic here
}
rednderedCallback(){console.log(this.recordId)}