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 selection column width is wrong when set fixed left #1283

Closed
coader opened this issue Oct 4, 2021 · 3 comments
Closed

datatable selection column width is wrong when set fixed left #1283

coader opened this issue Oct 4, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@coader
Copy link

coader commented Oct 4, 2021

TuSimple/naive-ui version (版本)

2.19.3

Vue version (Vue 版本)

3.2.19

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

Chrome91

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

Win10

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/tender-chaplygin-uon1q?file=/src/Demo.vue

Reappearance steps (重现步骤)

set selection and the other first column fixed=left
set td whitespace nowrap

Expected results (期望的结果)

keep selection column's witdh to be 40px

Actual results (实际的结果)

width be 16px

Remarks (补充说明)

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

coader commented Oct 4, 2021

大概看了一下 colgroup 里 width 在这种情况下不受控制了

@coader
Copy link
Author

coader commented Oct 4, 2021

增加 .n-data-table .n-data-table-th.n-data-table-th--selection
min-width:40px 可以解决
这种布局可能不太符合标准 但我这个场景还是比较有用的

@07akioni
Copy link
Collaborator

07akioni commented Oct 4, 2021

这个看起来可以处理,我来加一个 min-width 的属性

@07akioni 07akioni added bug Something isn't working 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
Projects
None yet
Development

No branches or pull requests

2 participants