react-component / react-component/input-number

Precision decimals losing 0 when focused for controlled input

Open
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
323
Forks
188
Avg merge
20h 3m
Merged PRs (30d)
1

Description

Hello
When precision is used and InputNumber is controlled and focused, it is losing last 0s in decimals.

https://codesandbox.io/s/2081443x6n

Press + or - multiple time for inputs.
first input "no form" has normal behavior (not controlled)
all other inputs loses last 0 in decimals.
if value is normalized, then it loses 0s only when input is not in focus and + or - is pressed first time

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and compare the uncontrolled input with the controlled inputs while using precision and pressing + or -. Trace the controlled, focused-input behavior and verify that trailing decimal zeros remain preserved in the affected cases, including normalized values.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.