Skip to content

Commit

Permalink
[fixed] Use actual ellipsis in pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Jan 19, 2016
1 parent e95a59c commit f187e04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Pagination = React.createClass({
*/
boundaryLinks: React.PropTypes.bool,
/**
* When `true`, will display the default node value ('...').
* When `true`, will display the default node value ('…').
* Otherwise, will display provided node (when specified).
*/
ellipsis: React.PropTypes.oneOfType([
Expand Down Expand Up @@ -130,7 +130,7 @@ const Pagination = React.createClass({
disabled
buttonComponentClass={buttonComponentClass}>
<span aria-label="More">
{this.props.ellipsis === true ? '...' : this.props.ellipsis}
{this.props.ellipsis === true ? '\u2026' : this.props.ellipsis}
</span>
</PaginationButton>
);
Expand All @@ -154,7 +154,7 @@ const Pagination = React.createClass({
disabled
buttonComponentClass={buttonComponentClass}>
<span aria-label="More">
{this.props.ellipsis === true ? '...' : this.props.ellipsis}
{this.props.ellipsis === true ? '\u2026' : this.props.ellipsis}
</span>
</PaginationButton>
);
Expand Down
6 changes: 3 additions & 3 deletions test/PaginationSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Pagination', () => {

assert.equal(pageButtons[0].innerText, '«');
assert.equal(pageButtons[1].innerText, '‹');
assert.equal(pageButtons[5].innerText, '...');
assert.equal(pageButtons[5].innerText, '');
assert.equal(pageButtons[6].innerText, '›');
assert.equal(pageButtons[7].innerText, '»');

Expand All @@ -93,8 +93,8 @@ describe('Pagination', () => {
let pageButtons = ReactTestUtils.scryRenderedDOMComponentsWithTag(instance, 'li');
// add first, last, prev, next and ellipsis button
assert.equal(pageButtons[2].innerText, '1');
assert.equal(pageButtons[3].innerText, '...');
assert.equal(pageButtons[7].innerText, '...');
assert.equal(pageButtons[3].innerText, '');
assert.equal(pageButtons[7].innerText, '');
assert.equal(pageButtons[8].innerText, '20');
});

Expand Down

0 comments on commit f187e04

Please sign in to comment.