Skip to content

fix(ui): fix NaN input in Pagination#1794

Open
guoda-puidokaite wants to merge 3 commits into
mainfrom
guoda-fix-nan
Open

fix(ui): fix NaN input in Pagination#1794
guoda-puidokaite wants to merge 3 commits into
mainfrom
guoda-fix-nan

Conversation

@guoda-puidokaite

Copy link
Copy Markdown
Contributor

Summary

When NaN input is entered, instead of printing NaN, the last available page is defaulted to.

Related Issues

Closes #1793

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@guoda-puidokaite guoda-puidokaite self-assigned this Jun 24, 2026
Copilot AI review requested due to automatic review settings June 24, 2026 06:11
@guoda-puidokaite guoda-puidokaite requested review from a team and franzheidl as code owners June 24, 2026 06:11
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c4c663d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes an input-edge-case in the Pagination component (input variant) so that non-numeric values no longer result in NaN being shown, aligning behavior with the expectation to fall back to the last available page.

Changes:

  • Clamp non-numeric (NaN) input values to controlTotalPage (last page) in the input handler.
  • Add a regression test covering symbol/non-numeric input behavior.
  • Add a changeset to release the fix as a patch for @cloudoperators/juno-ui-components.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/ui-components/src/components/Pagination/Pagination.component.tsx Treats NaN input as invalid and falls back to the last page (controlTotalPage).
packages/ui-components/src/components/Pagination/Pagination.test.tsx Adds a regression test for non-numeric input handling in the input variant.
.changeset/eleven-buses-bet.md Declares a patch release note for the Pagination NaN input fix.

Comment thread packages/ui-components/src/components/Pagination/Pagination.test.tsx Outdated
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

🚀 View preview at
https://cloudoperators.github.io/juno/pr-preview/pr-1794/

Built to branch gh-pages at 2026-06-24 08:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug](ui): when NaN input is entered into the Pagination field, NaN in printed

2 participants