-
Notifications
You must be signed in to change notification settings - Fork 196
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(interaction): 新增选中/高亮单元格 & 滚动 API #2586
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +564 B (+0.17%) Total Size: 327 kB
ℹ️ View Unchanged
|
你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。 Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2586 +/- ##
==========================================
+ Coverage 75.77% 80.75% +4.98%
==========================================
Files 257 180 -77
Lines 11994 10401 -1593
Branches 2464 2359 -105
==========================================
- Hits 9088 8399 -689
+ Misses 1398 555 -843
+ Partials 1508 1447 -61 ☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version @antv/s2-v2.0.0-next.26 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.0.0-next.25 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-components-v1.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
✨ Feature
📝 Description
1. 选中单元格 API 调整/完善
selectHeaderCell
变更为changeCell
, 支持所有类型单元格的选中。同时支持选中 (selectCell)
和高亮 (highlightCell)
等语法糖, 现有 API 可以实现 (如:s2.interaction.changeState()
), 但成本过高, 开发者需要理解部分源码逻辑, 简化从而满足外部逻辑主动触发的场景.同时支持
animate (是否展示滚动动画)
和skipScrollEvent (是否触发滚动事件)
配置2. 滚动 API 调整/完善
滚动 API
s2.updateScrollOffset
移除,统一至s2.interaction
命名空间下, 保持 API 一致性。同时支持scrollToCell
和scrollToTop
等语法糖。同时支持
animate (是否展示滚动动画)
和skipScrollEvent (是否触发滚动事件)
配置3. autoResetSheetStyle 支持动态判断
PS: 该 PR 为后续 2.0 迭代 checkbox radio 单选/多选做铺垫.
🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge