File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/react-bootstrap-table2/src Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 44import { Component } from 'react' ;
55import PropTypes from 'prop-types' ;
66
7- import { paginationElement } from '../table-factory' ;
7+ import { sortableElement } from '../table-factory' ;
88
99class SortWrapper extends Component {
1010 constructor ( props ) {
@@ -34,7 +34,7 @@ class SortWrapper extends Component {
3434 }
3535
3636 render ( ) {
37- return paginationElement ( {
37+ return sortableElement ( {
3838 ...this . props ,
3939 ref : node => this . table = node ,
4040 onSort : this . handleSort ,
Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ export const pureTable = props =>
2020 React . createElement ( BootstrapTable , { ...props } ) ;
2121
2222export const wrapWithPagination = ( props ) => {
23- const { wrapper } = props . pagination ;
24- const PaginationBase = wrapper ( pureTable ) ;
25- return React . createElement ( PaginationBase , { ...props } ) ;
23+ if ( props . pagination ) {
24+ const { wrapper } = props . pagination ;
25+ const PaginationBase = wrapper ( pureTable ) ;
26+ return React . createElement ( PaginationBase , { ...props } ) ;
27+ }
28+ return pureTable ( props ) ;
2629} ;
27- export const paginationElement = props => pureTable ( props ) ;
2830
2931export const sortableElement = props => wrapWithPagination ( props ) ;
3032
You can’t perform that action at this time.
0 commit comments