Skip to content

fix: forward NumberInput ref to input - #18904

Merged
JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/number-input-forward-ref-huyua9
Sep 11, 2026
Merged

JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/number-input-forward-ref-huyua9

Conversation

@huyua9

@huyua9 huyua9 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • forward NumberInput's declared HTMLInputElement ref to the internal number input
  • remove the ref from the layout wrapper div
  • preserve the existing UI and public props

Tests

  • oxfmt --check src/components/originui/number-input.tsx
  • oxlint src/components/originui/number-input.tsx
  • git diff --check

Note: full tsc --noEmit currently reports unrelated existing errors elsewhere in web/src.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ac08e408-f85e-46bc-98a7-7d48ee8219dc

📥 Commits

Reviewing files that changed from the base of the PR and between 44cac13 and 01959f8.

📒 Files selected for processing (1)
  • web/src/components/originui/number-input.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The NumberInput component now forwards its ref to the inner <input> element instead of the outer wrapper <div>.

Changes

Number input ref

Layer / File(s) Summary
Forward ref to input
web/src/components/originui/number-input.tsx
The forwarded ref now points to the input field instead of the wrapper element.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: dcc123456

Merge Risk: ⚪ Minimal · up to 01959

This focused change correctly exposes the inner number input through the forwarded ref with no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: forwarding the NumberInput ref to the internal input.
Description check ✅ Passed The description includes the required Summary section, explains the ref behavior change, states compatibility details, and lists validation results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit found a ref in flight
It hopped from wrapper to input tight
The number field now gets the call
No more ref upon the wall
Carrots cheer the cleaner sight

Comment @coderabbitai help to get the list of available commands.

@cike8899 cike8899 added the ci Continue Integration label Sep 11, 2026
@JinHai-CN
JinHai-CN merged commit 3a1fc91 into infiniflow:main Sep 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants