@@ -10,7 +10,7 @@ import ToolBar from './toolbar/ToolBar';
10
10
import TableFilter from './TableFilter' ;
11
11
import { TableDataStore } from './store/TableDataStore' ;
12
12
import Util from './util' ;
13
- import exportCSV from './csv_export_util' ;
13
+ import exportCSVUtil from './csv_export_util' ;
14
14
import { Filter } from './Filter' ;
15
15
16
16
class BootstrapTable extends Component {
@@ -914,7 +914,7 @@ class BootstrapTable extends Component {
914
914
csvFileName = csvFileName ( ) ;
915
915
}
916
916
917
- exportCSV ( result , keys , csvFileName ) ;
917
+ exportCSVUtil ( result , keys , csvFileName ) ;
918
918
}
919
919
920
920
handleSearch = searchText => {
@@ -1009,13 +1009,16 @@ class BootstrapTable extends Component {
1009
1009
}
1010
1010
1011
1011
renderToolBar ( ) {
1012
- const { selectRow, insertRow, deleteRow, search, children } = this . props ;
1012
+ const { exportCSV , selectRow, insertRow, deleteRow, search, children } = this . props ;
1013
1013
const enableShowOnlySelected = selectRow && selectRow . showOnlySelected ;
1014
1014
if ( enableShowOnlySelected
1015
1015
|| insertRow
1016
1016
|| deleteRow
1017
1017
|| search
1018
- || this . props . exportCSV ) {
1018
+ || exportCSV
1019
+ || this . props . options . searchPanel
1020
+ || this . props . options . btnGroup
1021
+ || this . props . options . toolBar ) {
1019
1022
let columns ;
1020
1023
if ( Array . isArray ( children ) ) {
1021
1024
columns = children . map ( ( column , r ) => {
@@ -1052,7 +1055,7 @@ class BootstrapTable extends Component {
1052
1055
enableInsert = { insertRow }
1053
1056
enableDelete = { deleteRow }
1054
1057
enableSearch = { search }
1055
- enableExportCSV = { this . props . exportCSV }
1058
+ enableExportCSV = { exportCSV }
1056
1059
enableShowOnlySelected = { enableShowOnlySelected }
1057
1060
columns = { columns }
1058
1061
searchPlaceholder = { this . props . searchPlaceholder }
0 commit comments