-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat: add previewValue option #934
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
base: master
Are you sure you want to change the base?
feat: add previewValue option #934
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改新增了 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Picker/RangePicker
participant InputField
participant Panel
User->>Picker/RangePicker: 打开选择面板
User->>Panel: 悬浮某个单元格
alt previewValue = 'hover'
Panel->>Picker/RangePicker: 触发 onPanelHover
Picker/RangePicker->>InputField: 更新预览值
else previewValue = false
Panel->>Picker/RangePicker: 触发 onPanelHover
Picker/RangePicker-->>InputField: 不更新预览值
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~45 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes无发现与目标不符或超出范围的代码变更。 Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (10)
🚧 Files skipped from review as they are similar to previous changes (9)
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #934 +/- ##
=======================================
Coverage 98.80% 98.80%
=======================================
Files 65 65
Lines 2669 2674 +5
Branches 742 742
=======================================
+ Hits 2637 2642 +5
Misses 29 29
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/PickerInput/SinglePicker.tsx
Outdated
@@ -433,7 +435,9 @@ function Picker<DateType extends object = any>( | |||
|
|||
// ======================== Panel ========================= | |||
const onPanelHover = (date: DateType | null) => { | |||
setInternalHoverValue(date); | |||
if (showPreviewValue) { |
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.
showHoverValue 如何?
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.
showHoverValue 如何?
类 Select 组件之后也可以支持一下这个功能
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.
突然想到,是否可以 previewValue={(info: { date }) => xxxx} |
中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
Summary by CodeRabbit