-
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: headerActionIcons 支持细粒度配置 & 修复异步渲染导致无法获取实例的问题 #2301
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: -15 B (0%) Total Size: 320 kB
ℹ️ View Unchanged
|
你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。 Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it. |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## next #2301 +/- ##
==========================================
+ Coverage 75.77% 76.82% +1.05%
==========================================
Files 257 268 +11
Lines 11994 12188 +194
Branches 2464 2482 +18
==========================================
+ Hits 9088 9363 +275
+ Misses 1398 1286 -112
- Partials 1508 1539 +31
☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version @antv/s2-v2.0.0-next.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.0.0-next.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
✨ Feature
🐛 Bugfix
📝 Description
headerActionIcons 支持细粒度配置
当同一个单元格配置了多个 icon 时, 为了区分是哪个 icon , 第二参数传入了 iconName, 那么在 icon 很多的场景
尤其是配置了
defaultHide
,displayConditions
,onClick
之类的动态展示场景,写法比较繁琐.现在修改为, 支持单个 icon 粒度的 hook
单个 icon 粒度的hook 优先级 > 所有 icon 的 hook, 这样可以满足对所有 icon 统一控制 和单独控制的场景诉求
修复异步渲染导致无法获取实例的问题
改为异步渲染后, 原先通过
useEffect
转发 ref 的方式不可用了S2/packages/s2-react/src/hooks/useSpreadSheet.ts
Lines 64 to 74 in f26904a
统一为
context
分发的方式, 修复下钻/编辑表 等场景报错的问题🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge