Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

fix: Pagination component's range and page text for no items #872

Merged

Conversation

McBrosa
Copy link
Contributor

@McBrosa McBrosa commented May 9, 2018

resolves #553

Summary:
When the total items provided to the Pagination component is 0 the correct item and page ranges will be displayed now. (ie. 0-0 of 0 items and 1 of 1 pages, instead of 1-0 of 0 items and 1 of 0 pages)

Additional Notes:
Pagination V2
screen shot 2018-05-09 at 5 31 12 pm

Pagination
screen shot 2018-05-09 at 5 19 08 pm

Changelog

Changed

  • Pagination, PaginationV2: Fix item and page ranges when there are no items.

@asudoh
Copy link
Contributor

asudoh commented May 10, 2018

Hi @McBrosa thank you for trying to address this problem space! Do you think your change has something to do with #755, or is it completely a separate issue?

@McBrosa
Copy link
Contributor Author

McBrosa commented May 14, 2018

They are similar but I believe there are still aspects of #533 that are not resolved in #755.
For example: (current master)

<Pagination {...props} totalItems={0} />

Result:
screen shot 2018-05-14 at 10 00 49 am
I would expect 0-0 of 0 items and 1 of 1 pages

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thank you for explaining @McBrosa!

Copy link
Contributor

@marijohannessen marijohannessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 ✅

@marijohannessen marijohannessen merged commit fc7b0cd into carbon-design-system:master May 17, 2018
@carbon-bot
Copy link

🎉 This PR is included in version 5.50.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@McBrosa McBrosa deleted the fix-page-menu-no-items branch May 23, 2018 19:43
kiett pushed a commit to kiett/carbon-components-react that referenced this pull request May 25, 2018
…design-system#872)

* fix: Pagination component's range and page text for no items, resolves #553

* fix: Update UTs for PaginationV2
alisonjoseph added a commit that referenced this pull request May 30, 2018
* chore: Update .babelrc, resolves  #885 (#886)

* chore: Update .babelrc, resolves  #885

* chore: Update pacage.json, resolves  #885

* chore(build): fix babel config for test (#892)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr (#887)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr

* Updated story description

* fix: Pagination component's range and page text for no items (#872)

* fix: Pagination component's range and page text for no items, resolves #553

* fix: Update UTs for PaginationV2

* feat(SearchFilterButton): add support for attaching event handlers (#896)

* fix(DatePicker): treat Flatpickr's default export as a constructor (#890)

Fixes #491.

* fix: console.errors coming from using Datepicker (#899)

* fix(package): update flatpickr to version 4.5.0 (#897)

* fix(package): update flatpickr to version 4.5.0

Closes #893

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

* fix(table-toolbar-search): add i18n support (#903)

* fix(OverflowMenu): fix <ClickOutside> not covering floating menu (#906)

Fixes #628.

* fix(icon-skeleton): Add missing export for IconSkeleton component (#917)

* fix(Search): make search icon description translatable (#927)

Fixes #923.

* fix(Tooltip): prevent aria-owns attribute being set unless the target really exists (#926)

Fixes #913.

* feat(slider): Add light prop to slider
joshblack pushed a commit that referenced this pull request Jun 4, 2018
* chore: Update .babelrc, resolves  #885 (#886)

* chore: Update .babelrc, resolves  #885

* chore: Update pacage.json, resolves  #885

* chore(build): fix babel config for test (#892)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr (#887)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr

* Updated story description

* fix: Pagination component's range and page text for no items (#872)

* fix: Pagination component's range and page text for no items, resolves #553

* fix: Update UTs for PaginationV2

* feat(SearchFilterButton): add support for attaching event handlers (#896)

* fix(DatePicker): treat Flatpickr's default export as a constructor (#890)

Fixes #491.

* fix: console.errors coming from using Datepicker (#899)

* fix(package): update flatpickr to version 4.5.0 (#897)

* fix(package): update flatpickr to version 4.5.0

Closes #893

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

* fix(table-toolbar-search): add i18n support (#903)

* fix(OverflowMenu): fix <ClickOutside> not covering floating menu (#906)

Fixes #628.

* fix(icon-skeleton): Add missing export for IconSkeleton component (#917)

* fix(Search): make search icon description translatable (#927)

Fixes #923.

* fix(Tooltip): prevent aria-owns attribute being set unless the target really exists (#926)

Fixes #913.

* feat(slider): Add light prop to slider
joshblack pushed a commit that referenced this pull request Jun 4, 2018
* chore: Update .babelrc, resolves  #885 (#886)

* chore: Update .babelrc, resolves  #885

* chore: Update pacage.json, resolves  #885

* chore(build): fix babel config for test (#892)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr (#887)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr

* Updated story description

* fix: Pagination component's range and page text for no items (#872)

* fix: Pagination component's range and page text for no items, resolves #553

* fix: Update UTs for PaginationV2

* feat(SearchFilterButton): add support for attaching event handlers (#896)

* fix(DatePicker): treat Flatpickr's default export as a constructor (#890)

Fixes #491.

* fix: console.errors coming from using Datepicker (#899)

* fix(package): update flatpickr to version 4.5.0 (#897)

* fix(package): update flatpickr to version 4.5.0

Closes #893

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

* fix(table-toolbar-search): add i18n support (#903)

* fix(OverflowMenu): fix <ClickOutside> not covering floating menu (#906)

Fixes #628.

* fix(icon-skeleton): Add missing export for IconSkeleton component (#917)

* fix(Search): make search icon description translatable (#927)

Fixes #923.

* fix(Tooltip): prevent aria-owns attribute being set unless the target really exists (#926)

Fixes #913.

* feat(slider): Add light prop to slider
alisonjoseph pushed a commit that referenced this pull request Jun 14, 2018
…Menu's open state (#889)

* feat(OverflowMenu): added onClose to props to notify menu is closed

* feat(OverflowMenu): moved onClose handler to componentDidUpdate

* feat(OverflowMenu): moved onClose handler to render() where state.open is surely changed

* feat(OverflowMenu): moved onClose handler to componentDidUpdate

* feat(OverflowMenu): add onOpen to notify caller menu's open state

* feat(OverflowMenu): moved onClose & onOpen handler to componentDidUpdate

* feat(OverflowMenu): added onClose to props to notify menu is closed

* chore(build): fix babel config for test (#892)

* feat(OverflowMenu): moved onClose handler to componentDidUpdate

* feat(OverflowMenu): moved onClose handler to render() where state.open is surely changed

* feat(OverflowMenu): moved onClose handler to componentDidUpdate

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr (#887)

* feat(DatePicker): Added minDate and maxDate props and pass them on to flatpickr

* Updated story description

* fix: Pagination component's range and page text for no items (#872)

* fix: Pagination component's range and page text for no items, resolves #553

* fix: Update UTs for PaginationV2

* feat(SearchFilterButton): add support for attaching event handlers (#896)

* fix(DatePicker): treat Flatpickr's default export as a constructor (#890)

Fixes #491.

* fix: console.errors coming from using Datepicker (#899)

* fix(package): update flatpickr to version 4.5.0 (#897)

* fix(package): update flatpickr to version 4.5.0

Closes #893

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

* fix(table-toolbar-search): add i18n support (#903)

* fix(OverflowMenu): fix <ClickOutside> not covering floating menu (#906)

Fixes #628.

* feat(OverflowMenu): add onOpen to notify caller menu's open state

* feat(OverflowMenu): moved onClose & onOpen handler to componentDidUpdate

* feat(OverflowMenu): moved onOpen call hook to_handlePlace

* feat(OverflowMenu): refine from Josh and Akira's reviews

* feat(OverflowMenu): refine from Josh and Akira's reviews

* feat(OverflowMenu): refine from Josh and Akira's reviews
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PaginationV2 page menu label blank when there are no items
8 participants