fix: fix the issue that ColorHexInput cannot manually input values caused by #53810#53814
Conversation
|
|
📝 WalkthroughSummary by CodeRabbit
Summary by CodeRabbit
Walkthrough本次变更重构了 Changes
Sequence Diagram(s)sequenceDiagram
participant Parent as 父组件
participant ColorHexInput as ColorHexInput组件
Parent->>ColorHexInput: 传递 value 属性
ColorHexInput->>ColorHexInput: useEffect 监听 value,格式化并设置 hexValue
User->>ColorHexInput: 输入新颜色值
ColorHexInput->>ColorHexInput: 更新 hexValue
ColorHexInput-->>Parent: onChange(仅当输入为有效 hex 时)
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (14)
🔇 Additional comments (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis pull request reverts previous changes to the Changes
|
👁 Visual Regression Report for PR #53814 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
| const ColorHexInput: FC<ColorHexInputProps> = ({ prefixCls, value, onChange }) => { | ||
| const colorHexInputPrefixCls = `${prefixCls}-hex-input`; | ||
| const [internalValue, setInternalValue] = useState(''); | ||
| const [hexValue, setHexValue] = useState(() => |
There was a problem hiding this comment.
The reversion to using hexValue state instead of a computed property is crucial to restoring the input's responsiveness. The previous implementation caused issues with input handling.
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 130 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
|
纯 revert 没有多余改动哈? |
|
changelog写一下 |
原PR #53701 看上去有5个文件,你这是修复吧?不算revert吧? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53814 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 774 774
Lines 14012 14015 +3
Branches 3711 3712 +1
=========================================
+ Hits 14012 14015 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
好了 |
|
好像不是 revert? |
我只还原了 |
…53814) Co-authored-by: afc163 <afc163@gmail.com>


中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
fix #53810
💡 Background and Solution
This commit reverts the changes made in commit 4bc93c3 to
ColorHexInput.tsx.The previous change replaced the
hexValuestate with a computed property, which caused the input to become unresponsive.📝 Change Log