Element: [Bug Report] Errors will be reported when using `show-header'to hide the header and `height' or `max-height'to set the height simultaneously in el-table

Created on 2 Sep 2019  ·  5Comments  ·  Source: ElemeFE/element

Element UI version

2.12.0

OS/Browsers version

win10

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/w54nto1y/

Steps to reproduce

el-table标签中同时设置
:show-header="false"

max-header="120px"
,在console中会有报错
[Vue warn]: Error in nextTick: "TypeError: Cannot read property 'querySelector' of undefined"

What is Expected?

不报错,隐藏表头时,设置高度不会再减去表头的高度

What is actually happening?

似乎是因为找不到表头所以报错

stale

Most helpful comment

All 5 comments

Translation of this issue:

Element UI version

2.12.0

OS/Browsers version

Win10

Vue version

2.6.10

Reproduction Link

Https://jsfiddle.net/w54nto1y/

Steps to reproduce

Simultaneously set in the `el-table'tag

show-header= "false"
and

max-header= "120 px"
There will be an error in console

[Vue warn]: Error in nextTick: "TypeError: Cannot read property'query Selector'of undefined"

What is Expected?

No error reporting. When hiding the header, the height of the header will not be subtracted from the height of the header.

What is actually happening?

It seems that the error was caused by the missing header.

Reproduced. Any maintainer?

the same issue faced

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kingwl picture Kingwl  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

smallpath picture smallpath  ·  3Comments

mochenxm picture mochenxm  ·  3Comments

fscardua picture fscardua  ·  3Comments