Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Change Proposal: Increment/Decrement Spinner Buttons for `NumberInput`

Đang mở
#273 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

@zoharma đang làm issue này rồi.

Từ ngày 5/8/2026.

  • #271 của @zoharma — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng việc xem xét component NumberInput hiện có và hành vi hiện tại của numberMode, minValue và maxValue, sau đó kiểm tra pull request đang mở #271 để hiểu phần công việc đã được triển khai. Công việc được xem là hoàn tất khi các nút spinner tùy chọn hỗ trợ các thiết lập step và khả năng hiển thị được đề xuất, giới hạn các giá trị theo các giới hạn và không ảnh hưởng đến các cách sử dụng hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

accepted

What is being proposed?

Add optional up/down spinner buttons to NumberInput so users can nudge a numeric value by a configurable step, instead of only being able to type a value directly.

Image

Why is this needed?

NumberInput currently only accepts typed input. For small, discrete adjustments (e.g. incrementing an integer count), typing is slower and more error-prone than a click-to-step control, which is a common affordance for numeric fields. There was previously no way to adjust the value without full keyboard entry.

What will change?

  • Behaviour: NumberInput can now render a vertical up/down ButtonGroup inside the field as an end adornment. Clicking increases/decreases the current value by step, clamped to minValue/maxValue. Buttons disable automatically at the limits.

  • New props:

    • step?: number: the increment/decrement amount, defaults to 1.
    • spinnerButtons?: "always" | "onHover" | "never": controls spinner visibility. Defaults to "onHover" for all number modes except "scientific", which defaults to "never" (since stepping isn't a natural operation on scientific-notation values).
    • No new component: this extends the existing NumberInput.

Interface changes (if any)

Additive/optional only — existing usages of NumberInput are unaffected.

<NumberInput
  label="Quantity"
  numberMode="natural"
  step={1}
  spinnerButtons="always" // "always" | "onHover" | "never"
/>

Breaking change?

  • Yes
  • No

Next steps

A maintainer will review this issue.
If accepted, it will be marked as accepted and a PR may then be opened.

Ngôn ngữ chính
TypeScript
Star
9
Fork
4
Merge trung bình
7 ngày 17 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DiamondLightSource/sci-react-ui

Tất cả issue của DiamondLightSource/sci-react-ui

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.