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
feat(ColorPicker): add destroyTooltipOnHide #42645
feat(ColorPicker): add destroyTooltipOnHide #42645
Conversation
看下是否需要改成名字,现在是直接拿的 popover 的属性名 destroyTooltipOnHide |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## feature #42645 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 650 650
Lines 10956 10956
Branches 2971 2971
=========================================
Hits 10956 10956
☔ View full report in Codecov by Sentry. |
不确定需不需要,内部讨论下。 |
…color-picker-destory-hide
@@ -48,6 +48,7 @@ group: | |||
| disabled | 禁用颜色选择器 | boolean | - | | |||
| placement | 弹出窗口的位置 | `top` \| `topLeft` \| `topRight` \| `bottom` \| `bottomLeft` \| `bottomRight` | `bottomLeft` | | |||
| arrow | 配置弹出的箭头 | `boolean \| { pointAtCenter: boolean }` | `true` | - | | |||
| destroyTooltipOnHide | 关闭后是否销毁弹窗 | `boolean` | `false` | |
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.
是不是没加版本号?
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
页面中 ColorPicker 比较多时,打开后 dom 数量比较多
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 82bace3
Add a new prop
destroyTooltipOnHide
to theColorPicker
component, which controls whether the color state is preserved or reset when the popover is hidden. Update the English and Chinese documentation for the component accordingly.🔍 Walkthrough
🤖 Generated by Copilot at 82bace3
destroyTooltipOnHide
prop toColorPicker
component to control whether the popover should be destroyed when hidden or not (link, link, link, link, link)ColorPickerProps
interface withdestroyTooltipOnHide
prop inherited fromPopoverProps
interface incomponents/color-picker/ColorPicker.tsx
(link)destroyTooltipOnHide
prop touseColorPicker
hook and use it to reset color state when popover is hidden incomponents/color-picker/ColorPicker.tsx
(link)destroyTooltipOnHide
prop toPopover
component and forward it torc-trigger
component incomponents/color-picker/ColorPicker.tsx
(link)destroyTooltipOnHide
prop and its default value in English and Chinese documentation files incomponents/color-picker/index.en-US.md
andcomponents/color-picker/index.zh-CN.md
(link, link)