(column, values, colIndex)
| 357 | } |
| 358 | |
| 359 | addColumn(column, values, colIndex) { |
| 360 | // Add a new column, including column defn and values |
| 361 | // Inserts at colNumber or adds to the right |
| 362 | this.cacheState(); |
| 363 | |
| 364 | if (colIndex === undefined) { |
| 365 | this.table.columns.push(column); |
| 366 | this.table.rows.forEach((row, i) => { |
| 367 | row.push(values[i]); |
| 368 | }); |
| 369 | } else { |
| 370 | this.table.columns.splice(colIndex, 0, column); |
| 371 | this.table.rows.forEach((row, i) => { |
| 372 | row.splice(colIndex, 0, values[i]); |
| 373 | }); |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | removeColumns(colIndex, count = 1) { |
| 378 | // Remove a column with data |
no test coverage detected