const ADD_TABLE_ROW = "ADD_TABLE_ROW"

const addTableRow = (tableName, tableRow) => {
  return {
    type: ADD_TABLE_ROW,
    tableName,
    tableRow
  }
}

/*

tableRow object:

{
  editing: bool,
  readOnly: bool,
  cells: {
    value: String or Number,
    type: String
  }
}

make Table map the tableRow state it's passed and create 
TableRow components from it

*/
const ADD_TABLE_ROW = "ADD_TABLE_ROW"

let nextTableRowId = 0
const addTableRow = (tableRow) => {
  return {
    type: ADD_TABLE_ROW,
    tableRow,
    id: nextTableRowId++
  }
}

/*

tableRow object:

{
  id: Integer,
  tableName: String,
  editing: bool,
  readOnly: bool,
  cells: [{
    value: String or Number,
    type: String
  }]
}

make Table map the tableRow state it's passed and create 
TableRow components from it

*/
Add comment that displays tableRow object shape
Add comment that displays tableRow object shape
