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

table 自定义渲染(render)函数中的index值 #3153

Closed
kkfive opened this issue Jun 21, 2022 · 4 comments · Fixed by #3160
Closed

table 自定义渲染(render)函数中的index值 #3153

kkfive opened this issue Jun 21, 2022 · 4 comments · Fixed by #3160
Assignees
Labels
feature request New feature or request priority: high

Comments

@kkfive
Copy link

kkfive commented Jun 21, 2022

TuSimple/naive-ui version (版本)

2.30.5

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

Microsoft Edge 102.0.1245.44 (正式版本) (64 位)

System and its version (系统及其版本)

Windows10

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/gallant-euclid-99tywy?file=/src/Demo.vue

Reappearance steps (重现步骤)

我试图通过render函数中返回的第二个参数做索引列,但是当我使用展开时(renderExpand),传递的索引与预期不符合

Expected results (期望的结果)

点击展开在render函数中传递的索引为当前行索引,而不是随着展开与关闭而变化

Actual results (实际的结果)

render函数中传递的索引会随着展开与关闭

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jun 21, 2022
@XieZongChen XieZongChen added bug Something isn't working and removed untriaged need to sort labels Jun 21, 2022
@07akioni 07akioni removed the bug Something isn't working label Jun 21, 2022
@07akioni
Copy link
Collaborator

当成一个 feature request 优化吧,之前给 index 的时候就把展开的也考虑进去了,这么处理确实会给用户带来一些困扰

@wangjinku
Copy link

在n-table-data中的树型数据中。期望 展开行可以计入 render 的 index 内 @kkfive

@wangjinku
Copy link

在n-table-data中的树型数据中。期望 展开行可以计入 render 的 index 内 @XieZongChen

@wangjinku
Copy link

在n-table-data中的树型数据中。期望 展开行可以计入 render 的 index 内 @XieZongChen
Uploading _20240220101604.png…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request priority: high
Projects
None yet
4 participants