react-component / react-component/input-number

Multiple decimal separators

Open
#685 1 comment 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

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.