-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: 修复树状模式下开启分页, 行头展开收起后表格渲染异常 close #2582 * chore: 更新 action * docs: 完善文档
- Loading branch information
1 parent
fae5496
commit 6bab9f6
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* 透视表分页功能,以树状结构展示行维度,切换分页,在点击角头行图标,表格数据渲染异常 | ||
* @description spec for issue #2582 | ||
* https://github.com/antvis/S2/issues/2582 | ||
*/ | ||
|
||
import { createPivotSheet } from '../util/helpers'; | ||
import type { S2Options, SpreadSheet } from '@/index'; | ||
|
||
const s2Options: S2Options = { | ||
width: 400, | ||
height: 400, | ||
hierarchyType: 'tree', | ||
pagination: { | ||
current: 2, | ||
pageSize: 4, | ||
}, | ||
}; | ||
|
||
describe('PivotSheet Tree Mode Pagination Layout Tests', () => { | ||
let s2: SpreadSheet; | ||
|
||
beforeEach(async () => { | ||
s2 = createPivotSheet(s2Options); | ||
await s2.render(); | ||
}); | ||
|
||
test('should render correctly when row header wider than canvas if hierarchyCollapse enable', async () => { | ||
s2.setOptions({ | ||
style: { | ||
rowCell: { | ||
collapseAll: true, | ||
}, | ||
}, | ||
}); | ||
await s2.render(false); | ||
|
||
expect(s2.facet.panelGroup.getBBox()).toEqual({ | ||
bottom: 92, | ||
height: 30, | ||
left: 122, | ||
right: 400, | ||
top: 62, | ||
width: 278, | ||
x: 122, | ||
y: 62, | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters