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: 减少开启 ReactDOM.unstable_batchedUpdates 后的重渲染次数 #2971

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

lijinke666
Copy link
Member

👀 PR includes

🐛 Bugfix

📝 Description

背景见 #2839

  onDataCellClick={(cell) => {
    ReactDOM.unstable_batchedUpdates(() => {
      setCheckedRowIndex(rowIndex);
      setCheckedColIndex(colIndex);
    });
  }}

image

🖼️ Screenshot

Before After

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 14, 2024 3:31am

@github-actions github-actions bot added the pr(fix) bug fix label Nov 11, 2024
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Nov 11, 2024
Copy link
Contributor

github-actions bot commented Nov 11, 2024

Size Change: +7 B (0%)

Total Size: 336 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 236 kB -6 B (0%)
./packages/s2-react/dist/index.min.js 70.9 kB +13 B (+0.02%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 388 B
./packages/s2-react/dist/style.min.css 3.77 kB
./packages/s2-vue/dist/index.min.js 23 kB
./packages/s2-vue/dist/style.min.css 1.85 kB

compressed-size-action

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 80.67%. Comparing base (ecdc9c8) to head (4af50b5).
Report is 483 commits behind head on next.

Files with missing lines Patch % Lines
packages/s2-react/src/hooks/useSpreadSheet.ts 28.57% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2971      +/-   ##
==========================================
+ Coverage   75.77%   80.67%   +4.90%     
==========================================
  Files         257      179      -78     
  Lines       11994    10444    -1550     
  Branches     2464     2376      -88     
==========================================
- Hits         9088     8426     -662     
+ Misses       1398      564     -834     
+ Partials     1508     1454      -54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lijinke666 lijinke666 merged commit 9007e8e into next Nov 14, 2024
7 of 9 checks passed
@lijinke666 lijinke666 deleted the fix-2839 branch November 14, 2024 03:48
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.33 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-react-v2.0.0-next.31 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(fix) bug fix released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 明细表设置了 themeCfg 之后,操作单元格会出现卡顿问题
3 participants