[number field] Make START_AUTO_CHANGE_DELAY Configurable for NumberField
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
# Feature request
## Summary
I'm using the NumberField component as a quantity input in a shopping cart.
To avoid sending too many HTTP requests, I use a debounce of 200ms on value change.
## Examples in other libraries
## Motivation
Problem:
The component’s built-in `START_AUTO_CHANGE_DELAY` is fixed at 400ms.
So when a user holds down the increment button:
At 200ms: debounce triggers an HTTP request (from the initial increment)
At 400ms: auto-repeat starts, causing a second value change → another HTTP request
This leads to two requests even though the user only held the button once.
Proposal:
Allow START_AUTO_CHANGE_DELAY to be set via props, so it can be aligned with external debounce timing.
Example API:
```tsx
```
Current Workaround:
Set the debounce timeout to >= 400ms, however this introduces a less responsive UX and feels laggy.
Contributor guide
Assessment
This issue has not been assessed yet.