Skip to content

Commit 2e3d3df

Browse files
committed
added row key to modify props
1 parent 567c5ec commit 2e3d3df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-legit-table",
3-
"version": "0.2.10",
3+
"version": "0.3.0",
44
"description": "the simplest table component out there",
55
"main": "lib/table.js",
66
"scripts": {

src/rows.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export default class Rows extends React.Component{
1818

1919
for(let item in row){
2020
let value = row[item]
21-
if(this.props.modifyAll) value = this.props.modifyAll(row[item], row)
22-
else if(this.props.modify[item]) value = this.props.modify[item](row[item], row)
21+
if(this.props.modifyAll) value = this.props.modifyAll(row[item], item, row)
22+
else if(this.props.modify[item]) value = this.props.modify[item](row[item], item, row)
2323

2424
rowList.push(<td key={uniqueId(row[item])}>{value}</td>)
2525
}

0 commit comments

Comments
 (0)