Revert "fix: keep onChange target mounted when value does not need cloning"#176
Conversation
…oning (#…" This reverts commit 1889137.
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
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 copiesselectionStart/selectionEndand proxiessetSelectionRangeto the real input element, which is whatreact-number-formatrelies on. No additional changes are needed inresolveOnChange.See ant-design/ant-design#46999 (comment) for details.