Skip to content

Commit

Permalink
Merge branch 'master' into add-new-miscellaneous-pictograms-issue-5
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Jun 22, 2020
2 parents 653217a + b11abf7 commit 12753df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3849,7 +3849,6 @@ Map {
"itemText": [Function],
"itemsPerPageText": "Items per page:",
"page": 1,
"pageInputDisabled": false,
"pageNumberText": "Page Number",
"pageRangeText": [Function],
"pageText": [Function],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const props = () => ({
pagesUnknown: boolean('Total number of items unknown (pagesUnknown)', false),
pageInputDisabled: boolean(
'[Deprecated]: Disable page input (pageInputDisabled)',
false
undefined
),
backwardText: text(
'The description for the backward icon (backwardText)',
Expand Down
14 changes: 5 additions & 9 deletions packages/react/src/components/Pagination/Pagination-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,21 @@ describe('Pagination', () => {

it('should hide text input if disabled', () => {
const noTextInput = shallow(
<Pagination
pageSizes={[100]}
pagesUnknown={true}
pageInputDisabled={true}
/>
<Pagination pageSizes={[100]} pagesUnknown={true} disabled={true} />
);
const right = noTextInput.find(
`.${prefix}--pagination__right .${prefix}--text__input`
);
expect(right.length).toEqual(0);
});

it('should not append `pagination__button--no-index` class if input is disabled', () => {
it('should append `pagination__button--no-index` class if input is disabled', () => {
const pagination = shallow(
<Pagination
page={2}
pageSizes={[100]}
pagesUnknown={true}
pageInputDisabled={true}
disabled={true}
/>
);
const forwardButton = pagination.find(
Expand All @@ -342,10 +338,10 @@ describe('Pagination', () => {
);
expect(
backwardButton.hasClass(`${prefix}--pagination__button--no-index`)
).toEqual(false);
).toEqual(true);
expect(
forwardButton.hasClass(`${prefix}--pagination__button--no-index`)
).toEqual(false);
).toEqual(true);
});
});

Expand Down
1 change: 0 additions & 1 deletion packages/react/src/components/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export default class Pagination extends Component {
page: 1,
pagesUnknown: false,
isLastPage: false,
pageInputDisabled: false,
itemText: (min, max) => `${min}${max} items`,
pageText: (page) => `page ${page}`,
};
Expand Down

0 comments on commit 12753df

Please sign in to comment.