Skip to content
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

fix(data-table): multiple expandTrigger with tree data #6646

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(data-table): multiple expandTrigger with tree data
Yhspehy committed Dec 27, 2024
commit 7e6f9d5236204ec520a696b6d3245bebcb0322b9
6 changes: 6 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## NEXT_VERSION

### Fixes

- Fix `n-data-table` multiple expandTrigger with tree data.

## 2.40.3

`2024-12-02`
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
### Fixes

- 修复 `n-scrollbar`、`n-float-button`、`n-float-button-group`、`n-popover` 组件中的 `inset` 属性在部分浏览器中有兼容性问题,close [#6604](https://github.com/tusen-ai/naive-ui/issues/6604),close [#6602](https://github.com/tusen-ai/naive-ui/issues/6602)
- 修复 `n-data-table`在使用树形数据的时候出现多个扩展icon的问题

## 2.40.3

4 changes: 2 additions & 2 deletions src/data-table/src/TableParts/Body.tsx
Original file line number Diff line number Diff line change
@@ -785,8 +785,8 @@ export default defineComponent({
const virtualXRowHeight = isVirtualX
? pxfy(heightForRow?.(rowData, actualRowIndex) || minRowHeight)
: undefined
const cells = iteratedCols.map((col) => {
const colIndex = col.index
const cells = iteratedCols.map((col, colIdx) => {
const colIndex = isVirtualX ? col.index : colIdx
if (displayedRowIndex in cordToPass) {
const cordOfRowToPass = cordToPass[displayedRowIndex]
const indexInCordOfRowToPass