Skip to content

Commit

Permalink
fix(data-table): multiple expandTrigger with tree data (#6646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yhspehy authored Dec 29, 2024
1 parent 42fd812 commit dd6278f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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`
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/data-table/src/TableParts/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd6278f

Please sign in to comment.