File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
react-bootstrap-table2/src Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -594,6 +594,7 @@ This prop also accept a function:
594
594
595
595
* ` column `
596
596
* ` columnIndex `
597
+ * ` props ` : It's an object and contain ` text ` property only.
597
598
598
599
## <a name =' footerClasses ' >column.footerClasses - [ String | Function] </a >
599
600
It's similar to [ ` column.classes ` ] ( #classes ) , ` footerClasses ` is available to have customized class on table footer column:
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { productsGenerator } from 'utils/common';
7
7
8
8
const products = productsGenerator ( ) ;
9
9
10
- function priceFormatter ( column , colIndex ) {
10
+ function priceFormatter ( column , colIndex , { text } ) {
11
11
return (
12
12
< h5 >
13
13
< strong > $$ { column . text } $$</ strong >
@@ -37,7 +37,7 @@ const columns = [
37
37
const sourceCode = `\
38
38
import BootstrapTable from 'react-bootstrap-table-next';
39
39
40
- function priceFormatter(column, colIndex) {
40
+ function priceFormatter(column, colIndex, { text } ) {
41
41
return (
42
42
<h5><strong>$$ { column.text } $$</strong></h5>
43
43
);
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class FooterCell extends eventDelegater(React.Component) {
54
54
if ( cellClasses ) cellAttrs . className = cs ( cellAttrs . className , cellClasses ) ;
55
55
if ( ! _ . isEmptyObject ( cellStyle ) ) cellAttrs . style = cellStyle ;
56
56
57
- const children = footerFormatter ? footerFormatter ( column , index ) : text ;
57
+ const children = footerFormatter ? footerFormatter ( column , index , { text } ) : text ;
58
58
59
59
return React . createElement ( 'th' , cellAttrs , children ) ;
60
60
}
You can’t perform that action at this time.
0 commit comments