Skip to content

chore: pick upload patch - #43200

Merged
zombieJ merged 1 commit into
4.x-stablefrom
pick-upload
Jun 27, 2023
Merged

zombieJ merged 1 commit into
4.x-stablefrom
pick-upload

Conversation

@zombieJ

@zombieJ zombieJ commented Jun 26, 2023 •

Copy link
Copy Markdown
Member

[中文版模板 / 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

pick #41082

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Upload onChange sometime not sync when in React 18.
🇨🇳 Chinese 修复 Upload 在 React 18 下 onChange 有时数据不正确的问题。

☑️ 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 496e6e0

Fix onChange bug and improve code style in Upload component. Use flushSync to ensure the callback is invoked after the state update. Apply consistent formatting for arrow functions and string literals in components/upload/Upload.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at 496e6e0

  • Fix a bug where the onChange callback might receive stale state values by wrapping it with flushSync (link)
  • Move the import of UploadList to follow the alphabetical order of imports and remove the duplicate import (link,link)
  • Wrap single parameter arrow functions with parentheses to follow the consistent style in the codebase (link,link,link,link,link,link,link)
  • Change the componentName prop of LocaleReceiver from double quotes to single quotes to follow the consistent style of using single quotes for string literals (link)

@github-actions

github-actions Bot commented Jun 26, 2023 •

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 281.87 KB (+3 B 🔺)
./dist/antd.min.css 66.31 KB
./dist/antd.dark.min.css 67.55 KB
./dist/antd.compact.min.css 66.26 KB
./dist/antd.variable.min.css 66.85 KB

@codecov

codecov Bot commented Jun 26, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (93a6ee1) 100.00% compared to head (496e6e0) 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           4.x-stable    #43200   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files             450       450           
  Lines            8344      8346    +2     
  Branches         2540      2540           
============================================
+ Hits             8344      8346    +2     
Impacted Files Coverage Δ
components/upload/Upload.tsx 100.00% <100.00%> (ø)

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

@zombieJ
zombieJ merged commit 02f876f into 4.x-stable Jun 27, 2023
@zombieJ
zombieJ deleted the pick-upload branch June 27, 2023 01:54
@MadCcc MadCcc mentioned this pull request Jun 27, 2023
20 tasks
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.

3 participants