I am getting the list values and displaying in react SPFX webpart like as below.
<divclassName={styles.rowStyle}>
<divclassName={styles.CellStyle}>How to Request
Access </div>
<divclassName={styles.CellStyle}>More Information</div>
<divclassName={styles.CellStyle}>How to get Training</div>
</div>
<divclassName={styles.rowStyle}>
<divclassName={styles.CellStyle2}>{item.CntctsReqAccess}></div>
<divclassName={styles.CellStyle2}>{item.CntctsMoreInfo}></div>
<divclassName={styles.CellStyle2}>{item.CntctsGetTraining}></div>
</div>
In the above if any of the column doesnt have any data or null i want to hide the columns including column header how can we achieve this?