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: 修复在局部复制和导出场景时, 格式化函数获取不到单元格信息 close #2866 #2871

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

lijinke666
Copy link
Member

👀 PR includes

🐛 Bugfix

📝 Description

复制/导出链路. formatter 调用时只传入了一个参数, 修改为根据根据 rowIndex/colIndex 获取 viewMeta, 然后传入, 和表格渲染的逻辑保持一致

meta: [{ 
	field: 'number',
- 	formatter: (value) => {} 
+   formatter: (value, data, viewMeta) => {} 
}]

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 Aug 20, 2024

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

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Aug 22, 2024 3:40am

@github-actions github-actions bot added the next 2.0-next 版本的问题 label Aug 20, 2024
@github-actions github-actions bot added the pr(fix) bug fix label Aug 20, 2024
@github-actions github-actions bot requested review from wjgogogo and wuhaiyang August 20, 2024 07:01
@lijinke666 lijinke666 linked an issue Aug 20, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

github-actions bot commented Aug 20, 2024

Size Change: +34 B (+0.01%)

Total Size: 329 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 229 kB +34 B (+0.01%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 388 B
./packages/s2-react/dist/index.min.js 70.8 kB
./packages/s2-react/dist/style.min.css 3.88 kB
./packages/s2-vue/dist/index.min.js 22.9 kB
./packages/s2-vue/dist/style.min.css 1.97 kB

compressed-size-action

Copy link
Contributor

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Aug 20, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.75%. Comparing base (ecdc9c8) to head (de1cc8a).
Report is 423 commits behind head on next.

Files Patch % Lines
...core/src/utils/export/copy/pivot-data-cell-copy.ts 66.66% 0 Missing and 1 partial ⚠️
...ckages/s2-core/src/utils/export/copy/table-copy.ts 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2871      +/-   ##
==========================================
+ Coverage   75.77%   80.75%   +4.98%     
==========================================
  Files         257      180      -77     
  Lines       11994    10404    -1590     
  Branches     2464     2359     -105     
==========================================
- Hits         9088     8402     -686     
+ Misses       1398      555     -843     
+ Partials     1508     1447      -61     

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

@lijinke666 lijinke666 merged commit f0db754 into next Aug 23, 2024
8 of 9 checks passed
@lijinke666 lijinke666 deleted the fix-2866 branch August 23, 2024 08:36
@lijinke666
Copy link
Member Author

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

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.

🐛Meta formatter data 参数在导出和复制中未传入
2 participants