in src/app/components/nodes-view/nodes-view.component.ts [198:223]
formatColumn() {
if (this.nodeDataSource.data.length === 0) {
return;
}
this.nodeColumnIds.forEach((colId) => {
if (colId === 'indicatorIcon') {
return;
}
// Verify whether all cells in the column are empty.
let isEmpty: boolean = true;
Object.values(this.nodeDataSource.data).forEach((node) => {
Object.entries(node).forEach((entry) => {
const [key, value] = entry;
if (key === colId && !(value === '' || value === 'n/a')) {
isEmpty = false;
}
});
});
if (isEmpty) {
this.nodeColumnIds = this.nodeColumnIds.filter((el) => el !== colId);
this.nodeColumnIds = this.nodeColumnIds.filter((colId) => colId !== 'attributes');
}
});
}