adobe / adobe/react-spectrum

Support live formatting in NumberField

Open
#6,156 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the feature here

I would be very nice to enable live formatting in the RAC NumberField component.

### 🤔 Expected Behavior?

When a user types the value is formatted while typing.

### 😯 Current Behavior

The value is currently only formatted when a user blurs (click outside/tab out) the input.

### 💁 Possible Solution

I would expected this to be the default behavior. But I imagine some developers would like to turn it off. So either a prop `liveFormatting?: boolean` or a prop `noLiveFormatting?: boolean`.

### 🔦 Context

When inputing large numbers (such as when a customer is applying for a loan at a bank), it is much easier for a user to read:
11 500 000, than 11500000 while typing.

### 💻 Examples

_No response_

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.