antvis / antvis/S2

🐛交叉表自定义排序会将空字符串置底

Open
#2,244 0 comments 1 reaction 0 assignees View on GitHub
💤 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

交叉表配置自定义排序后,维值中出现的空字符串会置底,无法参与排序
### ⌨️ Code Snapshots
![image](https://github.com/antvis/S2/assets/18070429/0d5ea720-1994-454f-9367-8f11538dfecf)

### 🔗 Reproduce Link
https://codesandbox.io/s/falling-pine-9l2v8k?file=/index.ts

### 🤔 Steps to Reproduce
打开Reproduce Link

### 😊 Expected Behavior
维值中的空字符串可以正常参与排序

### 😅 Current Behavior
维值中的空字符串无法参与排序,且会置底

### 💻 System information

| Environment | Info |
| ------- | ------- |
| System | macOS |
| Browser | Chrome |

Contributor guide

Open the contributing guide

Research direction

Start with index.ts in the linked CodeSandbox reproduction and reproduce the issue using @antv/s2 1.47.1 with a PivotSheet and custom sorting. Confirm the fix by checking that empty-string dimension values participate in the configured order instead of being placed last.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.