feat: support confirmOnDoubleClick config for needConfirm#961
feat: support confirmOnDoubleClick config for needConfirm#961QDyanbing wants to merge 1 commit intoreact-component:masterfrom
Conversation
|
@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
概览此更改为日期选择器组件添加了对双击确认行为的细粒度控制。通过引入新的 变更
预估代码审查工作量🎯 3 (中等) | ⏱️ ~25 分钟 建议审查者
诗歌
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a new configuration option, confirmOnDoubleClick, within the needConfirm prop for date and range pickers. This allows developers to explicitly control whether a double-click action on a picker cell triggers a submission. The changes involve updating the needConfirm type definition to support a configuration object, implementing the logic in the useFilledProps hook to extract this setting, and propagating the prop through SinglePicker, RangePicker, and PopupPanel. Additionally, unit tests have been added to verify that the submission behavior correctly respects the confirmOnDoubleClick setting. I have no feedback to provide.
|
暂时不支持该功能,先关闭了; |
变更说明
needConfirm增加对象配置形式,支持通过confirmOnDoubleClick控制是否允许双击直接确认needConfirm布尔用法兼容,默认行为不变测试计划
confirmOnDoubleClick: false关联问题
close ant-design/ant-design#57560
Summary by CodeRabbit
发行说明
新功能
needConfirm配置对象来独立控制是否在双击时确认日期/时间选择,使用{ confirmOnDoubleClick: false }可禁用此行为。测试