-
-
Notifications
You must be signed in to change notification settings - Fork 49.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ColorPicker presets cannot be selected #42882
Conversation
Pull reviewers statsStats of the last 30 days for ant-design:
|
})), | ||
[], | ||
); | ||
const items: CollapseProps['items'] = presetsValue.map((preset) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不memo了循环次数会不会比较多
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
逻辑里有需要实时判断 value
的,所以加不加区别不大,value
变了就要重新循环。
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #42882 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 715 715
Lines 64206 64199 -7
Branches 4753 4752 -1
=========================================
- Hits 64206 64199 -7
☔ View full report in Codecov by Sentry. |
测试用例补一下吧 |
ac6c90a
to
df882d5
Compare
….com/ant-design/ant-design into fix-color-picker-presets-not-checked
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at f5f4df7
Removed
useMemo
hook fromitems
variable incomponents/color-picker/components/ColorPresets.tsx
to fix a bug with color preset panels. This was part of a pull request to enhance the color picker component.🔍 Walkthrough
🤖 Generated by Copilot at f5f4df7
useMemo
hook fromitems
variable to fix panel update bug (link)