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
docs: Form add ColorPicker demo #42880
Conversation
需要更新 snapshot |
ok |
Pull reviewers statsStats of the last 30 days for ant-design:
|
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #42880 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 657 657
Lines 11041 11048 +7
Branches 2988 2990 +2
=========================================
+ Hits 11041 11048 +7
☔ View full report in Codecov by Sentry. |
0b7c575
to
7cd6fa9
Compare
https://codesandbox.io/s/xiao-yan-qi-ta-zu-jian-antd-5-6-1-forked-s9c5jw 看一下这个,ColorPicker 默认展示了一个 蓝色,但 form 还是认为没有值,感觉这个交互有点奇怪。 感觉默认情况是不是改为 无颜色 比较好,或者是在表单中默认无颜色,其他场景保持现状 |
赞同, 默认蓝色有误导嫌疑 |
目前好像没有空颜色这种状态,可能需要单独加个API🤔? |
我个人建议这样干, 默认值为 edit: 还有 undefined |
或者可以优化下逻辑,如果支持清除的场景下没给初始值就默认展示空颜色。 |
这个等大佬们度假归来讨论下,现在确实需要优化👌 |
ffc3d32
to
93b7e60
Compare
先别合,还差个 |
changelog 不对,这个其实不仅仅是添加示例。而是修复 ColorPicker 不跟随 Form 校验状态的问题。 |
我更新下描述 |
Note all: 等 #43483 发布后再合这个 PR |
等 #43483 发布?是不是贴错 PR 链接了 |
贴错了。 。 。等 minor 发布 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
ColorPicker
example and fixColorPicker
not followingForm
validation state☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 5ef894e
Added a color picker option to the form demo. Used
ColorPicker
from@ant-design/colors
and cleaned upcomponents/form/demo/validate-other.tsx
.🔍 Walkthrough
🤖 Generated by Copilot at 5ef894e
ColorPicker
component from@ant-design/colors
in form demo (components/form/demo/validate-other.tsx
, link, link)components/form/demo/validate-other.tsx
, link)