Skip to content
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: calendar onChange only trigger change #41553

Closed

Conversation

jglee96
Copy link

@jglee96 jglee96 commented Mar 30, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

#39801

💡 Background and solution

The Calendar header (headerRender or CalendarHeader) onChange call same function with RCPickerPanel, onInternalSelect.
The onInternalSelect call tirggerChange and onSelect.
It cause date change event trigger onSelect without select event.
Therefore I change to the header onChange cal only triggerChange

📝 Changelog

Language Changelog
🇺🇸 English Fix Calendar onSelect trigger when date changed without select
🇨🇳 Chinese 在没有选择的情况下更改日期时修复Calendar onSelect 触发器

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at c7b6eb9

Fixed a calendar bug that caused incorrect value display. Refactored onChange prop logic in components/calendar/generateCalendar.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at c7b6eb9

@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2023

Prepare preview

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (32f8134) 100.00% compared to head (c7b6eb9) 100.00%.

❗ Current head c7b6eb9 differs from pull request most recent head 91b11e5. Consider uploading reports for the commit 91b11e5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #41553   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          614       609    -5     
  Lines        10503     10465   -38     
  Branches      2876      2862   -14     
=========================================
- Hits         10503     10465   -38     
Impacted Files Coverage Δ
components/calendar/generateCalendar.tsx 100.00% <ø> (ø)

... and 43 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jglee96 jglee96 force-pushed the calendar-change-only-onchange branch from c7b6eb9 to 91b11e5 Compare April 10, 2023 04:34
@jglee96
Copy link
Author

jglee96 commented Apr 10, 2023

rebase branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants