Skip to content

Revert "fix: keep onChange target mounted when value does not need cloning"#176

Merged
afc163 merged 1 commit into
masterfrom
revert-175-codex/fix-input-mounted-change-target
May 21, 2026
Merged

Revert "fix: keep onChange target mounted when value does not need cloning"#176
afc163 merged 1 commit into
masterfrom
revert-175-codex/fix-input-mounted-change-target

Conversation

@afc163
Copy link
Copy Markdown
Member

@afc163 afc163 commented May 21, 2026

Reverts #175

The original issue (ant-design/ant-design#46999) has already been fixed in antd v6 — @rc-component/input@1.3.0 (used since antd 6.4+) properly copies selectionStart/selectionEnd and proxies setSelectionRange to the real input element, which is what react-number-format relies on. No additional changes are needed in resolveOnChange.

See ant-design/ant-design#46999 (comment) for details.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@afc163 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 59 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1786d417-8ba3-4ecd-a60a-94e19cdfa0d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1889137 and ac7de44.

📒 Files selected for processing (2)
  • src/utils/commonUtils.ts
  • tests/index.test.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-175-codex/fix-input-mounted-change-target

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

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.34%. Comparing base (1889137) to head (ac7de44).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
+ Coverage   98.13%   98.34%   +0.21%     
==========================================
  Files          11       11              
  Lines         428      423       -5     
  Branches      139      136       -3     
==========================================
- Hits          420      416       -4     
+ Misses          8        7       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@afc163 afc163 merged commit f6838d2 into master May 21, 2026
10 checks passed
@afc163 afc163 deleted the revert-175-codex/fix-input-mounted-change-target branch May 21, 2026 11:46
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the event handling logic in src/utils/commonUtils.ts by removing the cloneEventWithTarget function and updating resolveOnChange to consistently use cloneEvent. Additionally, a test case in tests/index.test.tsx that verified the previous behavior for unchanged values has been removed. I have no feedback to provide as there are no review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant