File tree 2 files changed +20
-3
lines changed
packages/react-bootstrap-table2/src
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ class BootstrapTable extends PropsBaseResolver(Component) {
91
91
< div className = { tableWrapperClass } >
92
92
< table id = { id } className = { tableClass } >
93
93
{ tableCaption }
94
+ { this . props . preHeader }
94
95
< Header
95
96
columns = { columns }
96
97
className = { this . props . headerClasses }
@@ -105,7 +106,10 @@ class BootstrapTable extends PropsBaseResolver(Component) {
105
106
selectRow = { selectRow }
106
107
expandRow = { expandRow }
107
108
filterPosition = { filterPosition }
109
+ preHeaderRow = { this . props . preHeaderRow }
110
+ postHeaderRow = { this . props . postHeaderRow }
108
111
/>
112
+ { this . props . postHeader }
109
113
{ hasFilters && filterPosition !== Const . FILTERS_POSITION_INLINE && (
110
114
< Filters
111
115
columns = { columns }
@@ -255,7 +259,9 @@ BootstrapTable.propTypes = {
255
259
searchText : PropTypes . string ,
256
260
searchContext : PropTypes . func
257
261
} ) ,
258
- setDependencyModules : PropTypes . func
262
+ setDependencyModules : PropTypes . func ,
263
+ preHeaderRow : PropTypes . node ,
264
+ postHeaderRow : PropTypes . node
259
265
} ;
260
266
261
267
BootstrapTable . defaultProps = {
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ const Header = (props) => {
23
23
onExternalFilter,
24
24
filterPosition,
25
25
globalSortCaret,
26
- wrapperClasses
26
+ wrapperClasses,
27
+ preHeaderRow,
28
+ postHeaderRow
27
29
} = props ;
28
30
29
31
let SelectionHeaderCellComp = ( ) => null ;
@@ -82,9 +84,11 @@ const Header = (props) => {
82
84
83
85
return (
84
86
< thead className = { wrapperClasses } >
87
+ { preHeaderRow }
85
88
< tr className = { className } >
86
89
{ childrens }
87
90
</ tr >
91
+ { postHeaderRow }
88
92
</ thead >
89
93
) ;
90
94
} ;
@@ -106,7 +110,14 @@ Header.propTypes = {
106
110
Const . FILTERS_POSITION_TOP ,
107
111
Const . FILTERS_POSITION_INLINE ,
108
112
Const . FILTERS_POSITION_BOTTOM
109
- ] )
113
+ ] ) ,
114
+ preHeaderRow : PropTypes . node ,
115
+ postHeaderRow : PropTypes . node
116
+ } ;
117
+
118
+ Header . defaultProps = {
119
+ preHeaderRow : null ,
120
+ postHeaderRow : null
110
121
} ;
111
122
112
123
export default Header ;
You can’t perform that action at this time.
0 commit comments