Skip to content

Commit

Permalink
#1562, pass additional rowindex and columnIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Sep 4, 2017
1 parent 5ca9c70 commit 99f56a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/js/column/column-title-table.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint max-len: 0 */
/* eslint no-unused-vars: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';

Expand All @@ -21,7 +22,7 @@ addProducts(5);

export default class ColumnAlignTable extends React.Component {

customTitle(cell, row) {
customTitle(cell, row, rowIndex, colIndex) {
return `${row.name} for ${cell}`;
}

Expand Down
2 changes: 1 addition & 1 deletion src/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class TableBody extends Component {
}
}
if (Utils.isFunction(column.columnTitle)) {
columnTitle = column.columnTitle(fieldValue, data);
columnTitle = column.columnTitle(fieldValue, data, r, i);
} else if (typeof column.columnTitle === 'string') {
columnTitle = column.columnTitle;
} else if (column.columnTitle) {
Expand Down

0 comments on commit 99f56a0

Please sign in to comment.