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

[Bug Report] the width of table has been increased when scaling when #11420

Closed
zaoyu63 opened this issue May 30, 2018 · 11 comments · Fixed by #21255
Closed

[Bug Report] the width of table has been increased when scaling when #11420

zaoyu63 opened this issue May 30, 2018 · 11 comments · Fixed by #21255

Comments

@zaoyu63
Copy link

zaoyu63 commented May 30, 2018

Element UI version

2.4.0

OS/Browsers version

macOs 10.13.4/ chrome 67.0.3396.62(正式版本)

Vue version

2.5.15

Reproduction Link

https://jsfiddle.net/zaoyu/1jb64fbx/2/

Steps to reproduce

in chrome, el-table parentNode, style="display:table-cell", when narrowing page until the x-scroll bar is appeared, resizeListener event is trigger unceasing, the width of table has been increased unceasing

What is Expected?

the width of table is not increase

What is actually happening?

the width of table has been increased unceasing

@element-bot element-bot changed the title [Bug Report] the width of table has been increased when scaling page [Bug Report] the width of table has been increased when scaling when May 30, 2018
@element-bot
Copy link
Member

Translation of this issue:

Element UI version
2.4.0

OS/Browsers version
MacOs 10.13.4/ chrome 67.0.3396.62 (official version)

Vue version
2.5.15

Reproduction Link
https://jsfiddle.net/zaoyu/1jb64fbx/2/

Steps to reproduce
In chrome, el-table parentNode, style= "display:table-cell", when narrowing page until the x-scroll.

What is Expected?
The width of table is not increase

What is actually happening?
The width of table has been increased unceasing

@zaoyu63
Copy link
Author

zaoyu63 commented Jun 25, 2018

t-bug
To zoom the browser, can appear the situation above

@qiuyeduxin
Copy link

In chrome, it will show 'ResizeObserver loop limit exceeded' when the el-table-column does not set width. What should we do when the table need a adaptive width?

@goldengecko
Copy link
Contributor

I have encountered this same resizing issue but for me it only appears to happen in Chrome for Windows (also tested Chrome for Mac, Safari, and Firefox Mac)

@bacy
Copy link

bacy commented Dec 9, 2019

I think I have the save problem.when I print an El Table, its width always bigger than the page. this cause the page broken.

@bacy bacy unassigned jikkai Dec 9, 2019
@morph85
Copy link

morph85 commented May 12, 2020

I found that the issue was caused by the parent element where "display: flex" is defined, it could be caused by other layout library as well. This could be workaround but turning it off fixed this issue. And for my case it only happen in Firefox.

@stale
Copy link

stale bot commented Jul 13, 2021

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.

@stale stale bot added the stale label Jul 13, 2021
@coderkeel
Copy link

coderkeel commented Aug 15, 2021

提供一个Hack方案

import Vue from 'vue'
import ElementUI,{ Table } from 'element-ui'

// 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题
const fixElTableErr = table => {
  const oldResizeListener = table.methods.resizeListener
  table.methods.resizeListener = function () {
    window.requestAnimationFrame(oldResizeListener.bind(this))
  }
}

// 一定要在Vue.use之前执行此函数
fixElTableErr(Table)

Vue.use(ElementUI)

@xxlbb123
Copy link

@coderkeel 我使用的是element-plus,这个el-table里面没有resizeListener这个方法怎么解决?

@xjs568349
Copy link

@coderkeel 我使用的是element-plus,这个el-table里面没有resizeListener这个方法怎么解决?

我也是,求解

@duduhhd
Copy link

duduhhd commented May 19, 2023

ts 哪个文件里面写呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.