Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 44222da

Browse files
close #1215
1 parent 1ae9b8a commit 44222da

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎docs/columns.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ This prop also accept a function:
594594

595595
* `column`
596596
* `columnIndex`
597+
* `props`: It's an object and contain `text` property only.
597598

598599
## <a name='footerClasses'>column.footerClasses - [String | Function]</a>
599600
It's similar to [`column.classes`](#classes), `footerClasses` is available to have customized class on table footer column:

‎packages/react-bootstrap-table2-example/examples/footer/column-format-table.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { productsGenerator } from 'utils/common';
77

88
const products = productsGenerator();
99

10-
function priceFormatter(column, colIndex) {
10+
function priceFormatter(column, colIndex,{ text }) {
1111
return (
1212
<h5>
1313
<strong>$$ {column.text} $$</strong>
@@ -37,7 +37,7 @@ const columns = [
3737
const sourceCode = `\
3838
import BootstrapTable from 'react-bootstrap-table-next';
3939
40-
function priceFormatter(column, colIndex) {
40+
function priceFormatter(column, colIndex, { text }) {
4141
return (
4242
<h5><strong>$$ { column.text } $$</strong></h5>
4343
);

‎packages/react-bootstrap-table2/src/footer-cell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class FooterCell extends eventDelegater(React.Component) {
5454
if (cellClasses) cellAttrs.className = cs(cellAttrs.className, cellClasses);
5555
if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle;
5656

57-
const children = footerFormatter ? footerFormatter(column, index) : text;
57+
const children = footerFormatter ? footerFormatter(column, index,{ text }) : text;
5858

5959
return React.createElement('th', cellAttrs, children);
6060
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /