addOneRow function

dynamic addOneRow(
  1. dynamic columns,
  2. dynamic rows
)

adds a row to existing row lists

Implementation

addOneRow(columns, rows) {
  var item = {};
  columns.forEach((element) {
    item[element['key']] = '';
  });
  rows.add(item);
  return rows;
}