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(interaction): 修复在未选中状态下调整宽高, 错误的修改了相邻单元格的样式 #2605

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

lijinke666
Copy link
Member

👀 PR includes

🐛 Bugfix

  • Solve the issue and close

📝 Description

修复在 https://github.com/antvis/S2/pull/2580/files#diff-25f297d6f5ede47828d6ddfcee924d9b9a7d7f3f46741bcba9cf96ed0d4973aeR297-R298 支持批量调整单元格样式后, 引入的一个 bug : 调整第一列, 但会更新第二列的单元格.

🖼️ Screenshot

Before After
Kapture 2024-03-18 at 14 43 07 Kapture 2024-03-18 at 14 40 49

🔗 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 Mar 18, 2024

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

Name Status Preview Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Mar 18, 2024 6:45am

@github-actions github-actions bot added next 2.0-next 版本的问题 pr(fix) bug fix labels Mar 18, 2024
@@ -292,22 +292,25 @@ export class RowColumnResize extends BaseEvent implements BaseEventImplement {
const { interaction } = this.spreadsheet;
const resizeInfo = this.getResizeInfo();

const isVertical = resizeInfo.type === ResizeDirectionType.Vertical;
const activeCells = isVertical
? interaction.getActiveRowCells()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果鼠标刚好 hover 到相邻的列头上, activeColCells 此时是它, 所以会更新错误, 对于单选和非选中场景, 都走默认逻辑

image

Copy link
Contributor

Size Change: +18 B (0%)

Total Size: 318 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 222 kB +18 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 402 B
./packages/s2-react/dist/index.min.js 69.3 kB
./packages/s2-react/dist/style.min.css 4 kB
./packages/s2-vue/dist/index.min.js 20.3 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 🚨 test failed 单元测试挂了 and removed 🚨 test failed 单元测试挂了 labels Mar 18, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.98%. Comparing base (ecdc9c8) to head (f09c71d).
Report is 284 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2605      +/-   ##
==========================================
+ Coverage   75.77%   78.98%   +3.21%     
==========================================
  Files         257      274      +17     
  Lines       11994    12387     +393     
  Branches     2464     2526      +62     
==========================================
+ Hits         9088     9784     +696     
+ Misses       1398     1067     -331     
- Partials     1508     1536      +28     

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

@lijinke666 lijinke666 merged commit 8019788 into next Mar 22, 2024
12 of 13 checks passed
@lijinke666 lijinke666 deleted the fix-resize branch March 22, 2024 08:10
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-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(fix) bug fix released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants