From b69c916c32f3cdadc8c1dea9101226050854b261 Mon Sep 17 00:00:00 2001 From: Dan Malone Date: Tue, 21 Sep 2021 12:49:10 +0100 Subject: [PATCH] Removing comment --- src/TableComponent.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/TableComponent.tsx b/src/TableComponent.tsx index f6a61c7..63d925d 100644 --- a/src/TableComponent.tsx +++ b/src/TableComponent.tsx @@ -75,7 +75,6 @@ const TableComponent: FunctionComponent = (props) => { // Calculate the column count from the first row const columnCount = value.rows[0].cells.length; - // Add as many cells as we have columns newValue.rows.splice(index, 0, { _type: config.rowType, _key: uuid(), @@ -115,12 +114,9 @@ const TableComponent: FunctionComponent = (props) => { const addColumnAt = (index: number) => { const newValue = deepClone(value); - // Add a cell to each of the rows + newValue.rows.forEach((_, i) => { - // for (let j = 0; j < 1; j++) { - // newValue.rows[i].cells[j].push(''); - newValue.rows[i].cells.splice(index, 0, '') - // } + newValue.rows[i].cells.splice(index, 0, '') }); return updateValue(newValue);