Skip to content

fix(module:input-number): consider input value ends with 0 as incomplete - #9051

Merged
HyperLife1119 merged 1 commit into
NG-ZORRO:masterfrom
Laffery:fix/input-number-not-completed
Mar 15, 2025
Merged

fix(module:input-number): consider input value ends with 0 as incomplete#9051
HyperLife1119 merged 1 commit into
NG-ZORRO:masterfrom
Laffery:fix/input-number-not-completed

Conversation

@Laffery

@Laffery Laffery commented Mar 15, 2025

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

input value like /[.。]$/ is considered as not completed, resulting in 3.0 being considered as completed number and being format to 3.

Issue Number: close #9049

What is the new behavior?

  1. typing 0
typing display (now) display (before)
3.0 3.0 3
3.10 3.10 3.1
3.00 3.00 3
  1. backspace the last character
backspace display (now) display (before)
3.01 3.0 3
3.101 3.10 3.1
3.001 3.00 3

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Laffery
Laffery requested a review from vthinkxie as a code owner March 15, 2025 10:32
@Laffery
Laffery force-pushed the fix/input-number-not-completed branch from 54954ea to e1fc4e4 Compare March 15, 2025 10:35
@Laffery
Laffery requested a review from HyperLife1119 March 15, 2025 10:36
@codecov

codecov Bot commented Mar 15, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.95%. Comparing base (bb48232) to head (e1fc4e4).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9051   +/-   ##
=======================================
  Coverage   91.95%   91.95%           
=======================================
  Files         559      559           
  Lines       19773    19773           
  Branches     3050     3050           
=======================================
  Hits        18182    18182           
  Misses       1265     1265           
  Partials      326      326           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HyperLife1119 HyperLife1119 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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.

can't input "1.02" on new nzInputNumber component

2 participants