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,可搜索select会导致页面卡死 #893

Open
lynshir opened this issue Dec 11, 2018 · 7 comments
Open

大BUG,可搜索select会导致页面卡死 #893

lynshir opened this issue Dec 11, 2018 · 7 comments

Comments

@lynshir
Copy link

lynshir commented Dec 11, 2018

可搜索的select多次输入删除,会直接卡死页面,可以多次输入删除数字1试试

@BillQiu
Copy link

BillQiu commented Dec 28, 2018

通过性能监测发现是页面多次 resize 导致。
img

// <Scrollbar /> 
addResizeListener(this.resizeDom, this.update);

挺严重的问题,建议添加 BUG 标签。

@mqliutie
Copy link

Input也是一样的, 没办法自己重写的

@BillQiu
Copy link

BillQiu commented Jan 10, 2019

给依赖的 Scrollbar 组件添加 noresize 即可解决。

@mqliutie
Copy link

@BillQiu Scrollbar没暴露给我们呀, 要改源码吗? 改源码在自动化部署情况还是避免不了这情况

@BillQiu
Copy link

BillQiu commented Jan 17, 2019

@BillQiu Scrollbar没暴露给我们呀, 要改源码吗? 改源码在自动化部署情况还是避免不了这情况

是没有暴露,只是提供了个解决的思路。

Emiya0306 added a commit to Emiya0306/element-react that referenced this issue Jan 30, 2019
@Emiya0306
Copy link
Contributor

Emiya0306 commented Jan 31, 2019

@hazel54 @loadchange
确实是个严重的bug,希望能尽快review这个PR。
凡是在带下拉框的Input中,都存在componentDidUpdate一直挂载event listener,却不卸载事件的问题。鼠标hover也会一直注册事件。

@rookie125
Copy link

@hazel54 @loadchange
确实是个严重的bug,希望能尽快review这个PR。
凡是在带下拉框的Input中,都存在componentDidUpdate一直挂载event listener,却不卸载事件的问题。鼠标hover也会一直注册事件。

光这么处理一下还是不能解决本质问题的,有两种方式可以解决

  1. componentDidUpdate钩子函数的内容全部搬到componentDidMount
  2. Scrollbar: Fixed infinite execution of the scrollbar component componentDidUpdate hook function #1035

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

No branches or pull requests

6 participants