Skip to content

Commit

Permalink
Removing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Danm72 committed Sep 21, 2021
1 parent 76d49b9 commit b69c916
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/TableComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const TableComponent: FunctionComponent<RootProps> = (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(),
Expand Down Expand Up @@ -115,12 +114,9 @@ const TableComponent: FunctionComponent<RootProps> = (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);
Expand Down

0 comments on commit b69c916

Please sign in to comment.