ElemeFE / ElemeFE/element

[Bug Report] For tables with fixed columns, re-rendering when the horizontal scroll bar disappears, will cause the height of the fixed columns to be calculated incorrectly

Open
#21,566 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.6

### OS/Browsers version
Chrome

### Vue version
2.6.11

### Reproduction Link
https://codepen.io/yxw19870806/pen/BawdvYP

### Steps to reproduce
1. The table has fixed fields
2. Adjust the size of the browser window, make the table has a horizontal scroll
2. Maximize the window (you need to ensure that the horizontal scroll bar disappears at this time)

In Reproduction Link, in order to increase the display effect and make it easier to distinguish
I set the background-color of .el-table__fixed::before, and .el-table::before

If the table does not have a horizontal scroll before re-render, the problem will not be reproduced
And it does not only happen when the size of the browser window changes. If the table data has change make the scroll bar disappears(For example, you reduce the number of table columns), it will have the same effect.

### What is Expected?
element-ui will re-render the table, as the scroll bar disappears, the table displays normally

### What is actually happening?
The height of the fixed field(class = 'el-table__fixed')is calculated incorrectly
In the real project, part of the content of the last row may be obscured

![无标题](https://user-images.githubusercontent.com/10380115/147028209-929b0bd8-8798-4405-b635-890ba394aa6e.jpg)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.