AmountField: opt-in mode that keeps the text as typed

Aperta
#253 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

@pasevin ci sta già lavorando.

Dal 12/11/2026.

  • #261 di @pasevin — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start with packages/components/src/components/fields/AmountField.tsx, especially the validation around line 196 and blur formatting around lines 97–103 and 201–205. Trace how the component accepts and emits values, then check nearby tests for AmountField. Done means the opt-in settings preserve the typed string and allow grouping commas while the default behavior stays the same.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

cla: allowlist

For money amounts I need the value exactly as typed. AmountField rejects grouping commas (AmountField.tsx#L196) and rewrites the value on blur through parseFloat().toFixed (#L201-L205, #L97-L103). With large amounts or many decimals that can change the number.

Suggested, opt-in: formatOnBlur={false} and allowGrouping, with the value kept as a string. The default stays as it is.

Lingua principale
TypeScript
Stelle
7
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenZeppelin/openzeppelin-ui

Tutte le issue di OpenZeppelin/openzeppelin-ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.