Element: [Bug Report] The max-height attribute in the fluid height of the table cannot change the height of the table when the data increases.

Created on 14 May 2019  ·  7Comments  ·  Source: ElemeFE/element

Element UI version

2.8.2

OS/Browsers version

Google Chrome 版本 74.0.3729.131(正式版本) (64 位)

Vue version

2.6.10

Reproduction Link

https://codepen.io/usernameddd/pen/XwNgOo

Steps to reproduce

把表中原先定义的数据移除到只剩一条记录时,再点击'添加数据'按钮,向表格中添加数据;此时,表格的高度一直固定在一条数据的高度,同时表格出现滚动条;

What is Expected?

当把表中原先定义的数据移除到只剩一条记录时,再点击'添加数据'按钮,向表格中添加数据;期待的效果是表格的高度会自动增加直到max-heigt所设定的值为止,高度超过max-height所设定的值之后再出现滚动条

What is actually happening?

当把表中原先定义的数据移除到只剩一条记录时,再点击'添加数据'按钮,向表格中添加数据;表格的高度一直固定为一行数据的高度并出现滚动条。这样表格的max-height相当于没有起作用。

All 7 comments

Translation of this issue:

Element UI version

2.8.2

OS/Browsers version

Google Chrome version 74.0.3729.131 (official version) (64 bits)

Vue version

2.6.10

Reproduction Link

Https://codepen.io/usernameddd/pen/XwNgOo

Steps to reproduce

Remove the data previously defined in the table to only one record, and then click the'Add Data'button to add data to the table. At this time, the height of the table has been fixed at the height of a data, while the table appears scroll bar.

What is Expected?

When removing the previously defined data from the table to only one record, click on the'Add Data'button to add data to the table; the expected effect is that the height of the table will automatically increase until the value set by max-heigt and the scroll bar will appear after the height exceeds the value set by max-height.

What is actually happening?

When removing the previously defined data from the table to only one record, click the'Add Data'button to add data to the table; the height of the table has been fixed to the height of one row of data and a scroll bar appears. So the max-height of the table is equivalent to no effect.

同样问题,静待回复

I also encountered the same phenomenon.

The same problem. Waiting for the answer.

一样碰到了这个问题
我目前是,更新数据的时候手动把.is-scrolling-none的maxHeight给毙掉,希望官方能早点解决这个bug把
this.$nextTick(() => {
document.querySelector('.is-scrolling-none').style.maxHeight = '';
});

我是页面加载得时候就是一行的高度,maxHeight没有生效,tab切换其他tab再回来才恢复正常

Duplicate of #15436

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yorululu picture yorululu  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

smallpath picture smallpath  ·  3Comments

Zhao-github picture Zhao-github  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments