@@ -1025,6 +1025,8 @@ class BootstrapTable extends Component {
10251025 renderToolBar ( ) {
10261026 const { exportCSV, selectRow, insertRow, deleteRow, search, children } = this . props ;
10271027 const enableShowOnlySelected = selectRow && selectRow . showOnlySelected ;
1028+ const print = typeof this . props . options . printToolBar === 'undefined' ?
1029+ true : this . props . options . printToolBar ;
10281030 if ( enableShowOnlySelected
10291031 || insertRow
10301032 || deleteRow
@@ -1059,7 +1061,7 @@ class BootstrapTable extends Component {
10591061 } ] ;
10601062 }
10611063 return (
1062- < div className = ' react-bs-table-tool-bar' >
1064+ < div className = { ` react-bs-table-tool-bar ${ print ? '' : 'hidden-print' } ` } >
10631065 < ToolBar
10641066 ref = 'toolbar'
10651067 defaultSearch = { this . props . options . defaultSearch }
@@ -1375,7 +1377,8 @@ BootstrapTable.propTypes = {
13751377 expandRowBgColor : PropTypes . string ,
13761378 expandBy : PropTypes . string ,
13771379 expanding : PropTypes . array ,
1378- beforeShowError : PropTypes . func
1380+ beforeShowError : PropTypes . func ,
1381+ printToolBar : PropTypes . bool
13791382 } ) ,
13801383 fetchInfo : PropTypes . shape ( {
13811384 dataTotalSize : PropTypes . number
@@ -1517,7 +1520,8 @@ BootstrapTable.defaultProps = {
15171520 expandRowBgColor : undefined ,
15181521 expandBy : Const . EXPAND_BY_ROW ,
15191522 expanding : [ ] ,
1520- beforeShowError : undefined
1523+ beforeShowError : undefined ,
1524+ printToolBar : true
15211525 } ,
15221526 fetchInfo : {
15231527 dataTotalSize : 0
0 commit comments