Tengo una tabla HTML hecha dinámicamente. Quiero ocultar una de las columnas con style.visibility = "hidden"
La celda que quiero ocultar se proporciona con la identificación necesaria, pero cuando hago esto, toda mi tabla desaparece.
// get element ID & set to hidden document.getElementById('wachtwoord')!.style.visibility = 'hidden' // set ID of the cell & append to DOM Object.values(userData).forEach((userDataElement, columnIndex) => { // create element and textnode let cell: HTMLTableDataCellElement = document.createElement("td"); let textNode: Text = document.createTextNode(userDataElement as string); // append to DOM cell.appendChild(textNode); row.appendChild(cell); table.appendChild(row); createTable!.appendChild(table); row.id = userData.id if (columnIndex === 3) { cell.id = "wachtwoord" };¿Cómo puedo ocultar una celda de tabla específica?