Skip to content

Commit

Permalink
Fixed improper formatting of pagination when a list of choices is not…
Browse files Browse the repository at this point in the history
… provided.
  • Loading branch information
kaspnilsson committed Feb 26, 2016
1 parent 79f5ab9 commit 9e7bc02
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions src/pagination/PaginationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,34 @@ class PaginationList extends React.Component {

return (
<div className="row" style={{ marginTop: 15 }}>
<div className="col-md-6">
{
this.props.sizePerPageList.length > 1 ?
<div className="dropdown">
<button className="btn btn-default dropdown-toggle" type="button" id="pageDropDown" data-toggle="dropdown"
aria-expanded="true">
{this.props.sizePerPage}
<span>
{" "}
<span className="caret"/>
</span>
</button>
<ul className="dropdown-menu" role="menu" aria-labelledby="pageDropDown">
{sizePerPageList}
</ul>
</div>
: ""
this.props.sizePerPageList.length > 1
? <div className="col-md-6">
<div className="dropdown">
<button className="btn btn-default dropdown-toggle" type="button" id="pageDropDown" data-toggle="dropdown"
aria-expanded="true">
{this.props.sizePerPage}
<span>
{" "}
<span className="caret"/>
</span>
</button>
<ul className="dropdown-menu" role="menu" aria-labelledby="pageDropDown">
{sizePerPageList}
</ul>
</div>
<div className="col-md-6">
<ul className="pagination" style={pageListStyle}>
{pageBtns}
</ul>
</div>
</div>
: <div className="col-md-12">
<ul className="pagination" style={pageListStyle}>
{pageBtns}
</ul>
</div>
}
</div>
<div className="col-md-6">
<ul className="pagination" style={pageListStyle}>
{pageBtns}
</ul>
</div>
</div>
)
}
Expand Down

0 comments on commit 9e7bc02

Please sign in to comment.