import React from 'react';
import Td from './Td';

const TableRow = ({ columns, row, totals }) => (
  <tr>
    {
      columns.map(c => <Td
        key={row[c.property] || `empty-${c.property}`}
        cell={row[c.property]}
        row={row}
        alignment={c.align}
        format={totals ? c.formatTotal || c.format : c.format}
      />)
    }
  </tr>
);

TableRow.propTypes = {
  columns: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
  row: React.PropTypes.object.isRequired,
  totals: React.PropTypes.bool
};

export default TableRow;

@@ -124,17 +124,22 @@
 mns.map(
-c
+(c, i)
  =%3E %3CTd%0A
@@ -151,16 +151,24 @@
    key=%7B
+%60$%7Bi%7D-$%7B
 row%5Bc.pr
@@ -178,13 +178,20 @@
 rty%5D
+%7D%60
  %7C%7C %60
+$%7Bi%7D-
 empt

fix duplicate keys in columns when using the same property in multiple columns