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

feat: 增加不同类型单元格的选中事件 & 支持识别事件来源 #2956

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

lijinke666
Copy link
Member

👀 PR includes

✨ Feature

  • New feature

📝 Description

单选/多选/圈选 等场景都会触发选中事件, 但是只有一个 GLOBAL_SELECTED 事件, 无法较好的区分是哪个交互触发

image

  1. 增加不同单元格的选中事件
  2. 事件回调中, 增加第二个参数
interface CellSelectedDetail {
  /**
   * 触发选中的交互名
   */
  interactionName?: `${InteractionName}`;
  /**
   * 触发选中的单元格
   */
  targetCell?: S2CellType | null;
}

🖼️ 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 1, 2024

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

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

@github-actions github-actions bot added pr(feature) new feature next 2.0-next 版本的问题 labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

Size Change: +434 B (+0.13%)

Total Size: 336 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 236 kB +303 B (+0.13%)
./packages/s2-react/dist/index.min.js 70.9 kB +35 B (+0.05%)
./packages/s2-vue/dist/index.min.js 23 kB +96 B (+0.42%)
ℹ️ 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/style.min.css 1.85 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Nov 1, 2024

你好, @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 Nov 1, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 80.48780% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.73%. Comparing base (ecdc9c8) to head (29818d5).
Report is 468 commits behind head on next.

Files with missing lines Patch % Lines
...eraction/base-interaction/click/data-cell-click.ts 60.00% 0 Missing and 2 partials ⚠️
packages/s2-core/src/interaction/root.ts 66.66% 0 Missing and 2 partials ⚠️
...raction/base-interaction/click/row-column-click.ts 80.00% 0 Missing and 1 partial ⚠️
...ckages/s2-core/src/interaction/event-controller.ts 50.00% 0 Missing and 1 partial ⚠️
...ackages/s2-core/src/interaction/range-selection.ts 0.00% 0 Missing and 1 partial ⚠️
...ages/s2-core/src/interaction/selected-cell-move.ts 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2956      +/-   ##
==========================================
+ Coverage   75.77%   80.73%   +4.96%     
==========================================
  Files         257      179      -78     
  Lines       11994    10432    -1562     
  Branches     2464     2374      -90     
==========================================
- Hits         9088     8422     -666     
+ Misses       1398      555     -843     
+ Partials     1508     1455      -53     

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

@lijinke666 lijinke666 merged commit 69f6479 into next Nov 1, 2024
8 of 9 checks passed
@lijinke666 lijinke666 deleted the feat-select-event-target branch November 1, 2024 10:24
@lijinke666
Copy link
Member Author

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

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.30 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

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

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(feature) new feature released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants