antvis / antvis/S2

树形结构自定义显示展开/折叠icon

Open
#2,268 2 comments 0 reactions 0 assignees View on GitHub
✅ accepted 💤 inactive
Dominant language
TypeScript
Stars
1.7k
Forks
220
PR merge metrics
No merged PRs in 30d

Description

### 🏷 Version

| Package | Version |
| -------------- | ------- |
| @antv/s2 | 1.47.1 |
| @antv/s2-react | |
| @antv/s2-vue | |

### Sheet Type

- [x] PivotSheet
- [ ] TableSheet
- [ ] GridAnalysisSheet
- [ ] StrategySheet
- [ ] EditableSheet

### 🖋 Description
树形结构时,没有子集的节点也出现了展开/折叠的icon;在定义rows时确定了层级的字段,但每一层的层级其实不确定的,就会出现没有子集的节点也显示了icon;重新RowCell里面的showTreeIcon方法,从meta里面也拿不到相应的数据进行判断,每次展开/折叠后meta里面level和children的值是变化的,找不到一个合适可用的判断条件

### 🔗 Reproduce Link

https://codesandbox.io/embed/quiet-water-hxzmmj?fontsize=14&hidenavigation=1&theme=dark

### 😊 Expected Behavior
可以自行判断是否显示展开/折叠的icon

### 😅 Current Behavior

Contributor guide

Open the contributing guide

Research direction

Start with RowCell and its showTreeIcon method, then reproduce the behavior using the linked CodeSandbox with @antv/s2 1.47.1. Trace the available metadata before and after expanding or collapsing rows; done means leaf nodes do not show the icon and icon visibility can be determined according to the configured tree data.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.