I'm trying to show or not show the content of field in a data table depending on if it is null or empty etc. What am I doing wrong?
<th scope="col"> <div lwc:if={isNotes}> <a href="#" data-id={task.Id} onclick={clickViewTask} data-index={index}>{task.Name} Notes </a> </div> </th> LWC .js @wire(getList, { retId: '$recordId'}) //a3Z8K000001bxakUAA contactRec(result) { this.taskResult = result; if(result.error){ console.log('error is#'+result.error); this.error = result.error; } else if(result.data){ this.lsttasklist = result.data; let tempArray = []; for(let i=0; i<this.lsttasklist.length; i++) { tempArray.push({Id:this.lsttasklist[i].Id, Owner_Name__c:this.lsttasklist[i].Owner_Name__c, Name:this.lsttasklist[i].Name, Risk_Event__r:this.lsttasklist[i].Risk_Event__r, RiskEventName:this.lsttasklist[i].Risk_Event__r.Name, Phase__c :this.lsttasklist[i].Phase__c, Task__c:this.lsttasklist[i].Task__c, Task_Name__c:this.lsttasklist[i].Task_Name__c, Task_Status__c:this.lsttasklist[i].Task_Status__c, Notes_Log__c:this.lsttasklist[i].Notes_Log__c, Started_Date__c:this.lsttasklist[i].Started_Date__c, Closed_Date__c:this.lsttasklist[i].Closed_Date__c, Risk_Event__c:this.lsttasklist[i].Risk_Event__c, IsExpanded:false, isNotes:false, ButtonLabel:"+"}); } this.tasklist = tempArray; if (tempArray.Notes_Log__c != null) { this.isNotes = true; } } }