-
-
Notifications
You must be signed in to change notification settings - Fork 320
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: needConfirm false should not trigger open in SinglePicker #914
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough该变更主要涉及三个方面:从 Changes
Sequence Diagram(s)sequenceDiagram
participant User as 用户
participant DayPicker as DayPicker 组件
participant Callback as onOpenChange 回调
User->>DayPicker: 打开选择器
DayPicker->>Callback: 调用 onOpenChange(true)
User->>DayPicker: 点击外部区域
DayPicker->>Callback: 调用 onOpenChange(false)
sequenceDiagram
participant Component as SinglePicker 组件
participant Hook as useLayoutEffect
Component->>Hook: 检查条件(复杂选择器、无需确认、panel操作)
Note right of Hook: 之前会调用 triggerOpen(true)
Hook--)Component: 现不再触发 triggerOpen 调用
Component->>Component: 直接执行 triggerConfirm() 进行确认逻辑
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
tests/new-range.spec.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
🔇 Additional comments (1)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #914 +/- ##
==========================================
+ Coverage 98.71% 98.79% +0.07%
==========================================
Files 64 64
Lines 2652 2649 -3
Branches 736 708 -28
==========================================
- Hits 2618 2617 -1
+ Misses 31 29 -2
Partials 3 3 ☔ View full report in Codecov by Sentry. |
* fix: needConfirm false should not trigger open in SinglePicker (#914) * chore: clean up * chore: update script
fix ant-design/ant-design#52973
Summary by CodeRabbit