Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handled 0 total items in pagination #16876

Merged

Conversation

riddhybansal
Copy link
Contributor

Closes #16625

Handled 0 total items in pagination

Changelog

Changed

  • Added condition for 0 total items and added test case for the same.

Testing / Reviewing

Go to pagination -> Go to playground -> Set totalItems as 0
Pagination should display 0-0 of 0 items not any other numbers and 1 of 1 page not NaN pages.

@riddhybansal riddhybansal requested a review from a team as a code owner June 27, 2024 10:53
Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b5b28d1
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/667d44915ef83c00084ba571
😎 Deploy Preview https://deploy-preview-16876--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b5b28d1
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/667d4491592a5b00081a3306
😎 Deploy Preview https://deploy-preview-16876--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0bdd499
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/667d449b8cf75e00089f9582
😎 Deploy Preview https://deploy-preview-16876--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 0bdd499
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/667d449bf9ae2c0008132d24
😎 Deploy Preview https://deploy-preview-16876--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@Gururajj77 Gururajj77 left a comment

Choose a reason for hiding this comment

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

Looks good, nice work!

@alisonjoseph
Copy link
Member

LGTM! Thanks for adding the test

@riddhybansal riddhybansal added this pull request to the merge queue Jul 1, 2024
Merged via the queue into carbon-design-system:main with commit a2d4764 Jul 1, 2024
22 checks passed
@riddhybansal riddhybansal deleted the Pagination_display_error branch July 1, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Pagination - incorrect display when there are no items
4 participants