Skip to content

Commit 817eac3

Browse files
committed
remove class:react-bootstrap-table-page-btns-ul when pagination panel is custom
1 parent 3523076 commit 817eac3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/pagination/PaginationList.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { Component, PropTypes } from 'react';
2+
import classSet from 'classnames';
23
import PageButton from './PageButton.js';
34
import SizePerPageDropDown from './SizePerPageDropDown';
45
import Const from '../Const';
@@ -80,7 +81,7 @@ class PaginationList extends Component {
8081
} = this.props;
8182
this.totalPages = Math.ceil(dataSize / sizePerPage);
8283
this.lastPage = this.props.pageStartIndex + this.totalPages - 1;
83-
const pageBtns = this.makePage();
84+
const pageBtns = this.makePage(typeof paginationPanel === 'function');
8485
const dropdown = this.makeDropDown();
8586

8687
const offset = Math.abs(Const.PAGE_START_INDEX - pageStartIndex);
@@ -180,7 +181,7 @@ class PaginationList extends Component {
180181
return dropdown;
181182
}
182183

183-
makePage() {
184+
makePage(isCustomPagingPanel = false) {
184185
const pages = this.getPages();
185186
const isStart = (page, { currPage, pageStartIndex, firstPage, prePage }) =>
186187
(currPage === pageStartIndex && (page === firstPage || page === prePage));
@@ -209,8 +210,12 @@ class PaginationList extends Component {
209210
</PageButton>
210211
);
211212
}, this);
213+
const classname = classSet(
214+
isCustomPagingPanel ? null : 'react-bootstrap-table-page-btns-ul',
215+
'pagination'
216+
);
212217
return (
213-
<ul className='react-bootstrap-table-page-btns-ul pagination'>
218+
<ul className={ classname }>
214219
{ pageBtns }
215220
</ul>
216221
);

0 commit comments

Comments
 (0)