react-component / react-component/input-number
Multiple decimal separators
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 188
- Avg merge
- 20h 3m
- Merged PRs (30d)
- 1
Description
In many applications, it would make sense to accept more than one decimal separators and "normalize" it to the current locale. This is what Unity does, for instance. You can either use , or ., and it will auto-convert it to ..
Currently, if I enter 0,5 in German notation, input-number converts the number to the integer 5, which is almost never what you'd want.
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 by locating the input-number parsing and formatting entry points, then review existing tests for decimal input and locale behavior. Reproduce the German 0,5 case and compare it with 0.5; done means both separators are handled without truncation and the expected normalized value is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100