-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat: add showHoverValue 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 showHoverValue 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 showHoverValue = true
Panel->>Picker/RangePicker: 触发 onPanelHover
Picker/RangePicker->>InputField: 更新预览值
else showHoverValue = false
Panel->>Picker/RangePicker: 触发 onPanelHover
Picker/RangePicker-->>InputField: 不更新预览值
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~45 minutes 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
src/PickerInput/RangePicker.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
src/PickerInput/SinglePicker.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ 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 ReportAll 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 2673 +4
Branches 742 719 -23
=======================================
+ Hits 2637 2641 +4
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.
中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
Summary by CodeRabbit