-
Notifications
You must be signed in to change notification settings - Fork 197
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
透视表树模式是否可以支持展开/收起图标条件渲染? #2753
Comments
红框的两个 icon 分别位于 角头和行头, 你可以自定义 内部展开/收起的 icon 的判断是这个, 你可以重写 S2/packages/s2-core/src/cell/corner-cell.ts Lines 199 to 205 in 8eeee82
S2/packages/s2-core/src/cell/row-cell.ts Lines 79 to 81 in 8eeee82
class CustomCornerCell extends CornerCell {
showTreeIcon() {
// 你的逻辑
}
}
class CustomRowCell extends RowCell {
showTreeIcon() {
// 你的逻辑
}
} |
感谢解答 目前还有两个问题 我现在使用树模式,重写CustomRowCell的逻辑如下 class CustomRowCell extends RowCell { 问题1:this.meta中的isLeaf始终为undefined,是有配置项控制么? |
🏷 Version
Sheet Type
🖋 Description
当前使用s2-react透视表的树模式(hierarchyType: "tree"),希望部分行(如图中红色部分)可以禁用展开/收起功能,同时隐藏对应图标,是否有配置可以支持?
🔗 Reproduce Link
😊 Expected Behavior
希望图中红色行不展示图标
😅 Current Behavior
所有行都会展示图标
The text was updated successfully, but these errors were encountered: