@@ -10,7 +10,7 @@ import ToolBar from './toolbar/ToolBar';
1010import TableFilter from './TableFilter' ;
1111import { TableDataStore } from './store/TableDataStore' ;
1212import Util from './util' ;
13- import exportCSV from './csv_export_util' ;
13+ import exportCSVUtil from './csv_export_util' ;
1414import { Filter } from './Filter' ;
1515
1616class BootstrapTable extends Component {
@@ -914,7 +914,7 @@ class BootstrapTable extends Component {
914914 csvFileName = csvFileName ( ) ;
915915 }
916916
917- exportCSV ( result , keys , csvFileName ) ;
917+ exportCSVUtil ( result , keys , csvFileName ) ;
918918 }
919919
920920 handleSearch = searchText => {
@@ -1009,13 +1009,16 @@ class BootstrapTable extends Component {
10091009 }
10101010
10111011 renderToolBar ( ) {
1012- const { selectRow, insertRow, deleteRow, search, children } = this . props ;
1012+ const { exportCSV , selectRow, insertRow, deleteRow, search, children } = this . props ;
10131013 const enableShowOnlySelected = selectRow && selectRow . showOnlySelected ;
10141014 if ( enableShowOnlySelected
10151015 || insertRow
10161016 || deleteRow
10171017 || search
1018- || this . props . exportCSV ) {
1018+ || exportCSV
1019+ || this . props . options . searchPanel
1020+ || this . props . options . btnGroup
1021+ || this . props . options . toolBar ) {
10191022 let columns ;
10201023 if ( Array . isArray ( children ) ) {
10211024 columns = children . map ( ( column , r ) => {
@@ -1052,7 +1055,7 @@ class BootstrapTable extends Component {
10521055 enableInsert = { insertRow }
10531056 enableDelete = { deleteRow }
10541057 enableSearch = { search }
1055- enableExportCSV = { this . props . exportCSV }
1058+ enableExportCSV = { exportCSV }
10561059 enableShowOnlySelected = { enableShowOnlySelected }
10571060 columns = { columns }
10581061 searchPlaceholder = { this . props . searchPlaceholder }
0 commit comments