antvis / antvis/S2

🐛明细表交叉表设置指定列宽度后,表格剩余列无法自适应容器宽度

Open
#1,820 9 comments 0 reactions 1 assignee Claimed by @lijinke666 View on GitHub
⚡ enhancement 💤 inactive pivot sheet table sheet
Dominant language
TypeScript
Stars
1.7k
Forks
220
PR merge metrics
No merged PRs in 30d

Description

### 🏷 Version

latest
@antv/s2

### Sheet Type

- [ ] PivotSheet
- [ ] TableSheet

### 🖋 Description
明细表交叉表设置指定列宽度后,表格剩余列无法自适应容器宽度

### ⌨️ Code Snapshots

![image](https://user-images.githubusercontent.com/34097936/195537607-f846b4e2-781b-4607-a478-ec438a190c0c.png)
![image](https://user-images.githubusercontent.com/34097936/195537621-20f6a848-f50f-47e3-9ac7-e65a6351b6b1.png)

### 🤔 Steps to Reproduce
在https://s2.antv.vision/zh/examples/basic/pivot#grid
将s2Options修改为
```
const s2Options = {
width: 900,
height: 480,
style: {
colCfg: {
width: (colNode) => {
console.log('colNode: ', colNode);
return colNode.colIndex <= 2 ? 100 : 50
},
},
},
};
```
明细表同理
### 😊 Expected Behavior
设置指定列宽厚表格仍撑满容器
### 😅 Current Behavior
设置指定列宽厚表格不撑满容器
### 💻 System information

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.