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

datatable throw error when has summary row and selection column #1276

Closed
coader opened this issue Oct 3, 2021 · 1 comment
Closed

datatable throw error when has summary row and selection column #1276

coader opened this issue Oct 3, 2021 · 1 comment
Labels
bug Something isn't working priority: high

Comments

@coader
Copy link

coader commented Oct 3, 2021

TuSimple/naive-ui version (版本)

2.19.3

Vue version (Vue 版本)

3.2.19

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

Chrome 91

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

Win10

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/cool-sunset-cw41g?file=/src/Demo.vue

Reappearance steps (重现步骤)

error at:

                    const mergedColSpan = isSummary
                        ? rowInfo.rawNode[colKey].colSpan || 1
                        : colSpan
                            ? colSpan(rowData, rowIndex)
                            : 1;

it should find colKey with 'n_selection'

Expected results (期望的结果)

change to rowInfo.rawNode[colKey]? rowInfo.rawNode[colKey].colSpan:1

Actual results (实际的结果)

.

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Oct 3, 2021
@coader
Copy link
Author

coader commented Oct 3, 2021

i have to add this property to summary row object and it's ok
return [{ 'n_selection': { colSpan: 1 }, ... ]

@07akioni 07akioni added bug Something isn't working priority: high and removed untriaged need to sort labels Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Projects
None yet
Development

No branches or pull requests

2 participants