react-component / react-component/input-number
Regression with v7: precision and formatter collide
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 188
- Avg merge
- 20h 3m
- Merged PRs (30d)
- 1
Description
Since v7, the precision is skipped if a formatter is passed.
Here's an example with precision 2 and a formatter adding columns for every thousand: 100,000.00
With v6.1.2:
https://codesandbox.io/s/spring-sunset-dwr0o?file=/src/App.js
With v7
https://codesandbox.io/s/trusting-dan-vmhmc?file=/src/App.js
Here's the fault line: https://github.com/react-component/input-number/blob/master/src/InputNumber.tsx#L175
I am not sure what the right fix would be though.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at InputNumber.tsx around line 175 and reproduce the precision and formatter behavior using the linked v6.1.2 and v7 CodeSandbox examples. Confirm that precision is preserved when a formatter adds thousands separators; done means the v7 behavior matches the stated 100,000.00 result.
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