简体   繁体   English

ExtJS —网格rowwidget插件,可滚动创​​建小部件

[英]ExtJS — grid rowwidget plugin creating widgets on scroll

I have an ExtJS 6.5.1 app. 我有一个ExtJS 6.5.1应用程序。 I have a grid that uses the "rowwidget" plugin with a grid as the widget. 我有一个使用“ rowwidget”插件的网格,其中的网格作为小部件。 If I scroll the parent grid all the way to the bottom then back to the top, it creates a duplicate widget for that row causing unexpected behavior. 如果我将父网格一直滚动到底部然后又回到顶部,则会为该行创建重复的窗口小部件,从而导致意外行为。

Here is the fiddle. 是小提琴。

Steps to reproduce: 1) Expand any row 2) scroll parent grid all the way to the bottom 3) scroll back to top 重现步骤:1)展开任意行2)将父网格一直滚动到底部3)滚动回到顶部

and you will notice the length of the widget component increasing meaning multiple instances are being created. 并且您会注意到小部件组件的长度增加,这意味着正在创建多个实例。 After a while everything breaks and I get all sorts of errors. 一段时间后,一切都崩溃了,我得到了各种各样的错误。

I think I find the culprit, the grid is "bufferedRenderer: true" by default, set it to false 我想我找到了罪魁祸首,默认情况下网格为“ bufferedRenderer:true”,将其设置为false

bufferedRenderer:false

otherwise it keeps erasing the widget when the row is out of view and when you scroll back it creates another one 否则,当该行不在视图中时,它将继续擦除该小部件;当您向后滚动时,它将创建另一个小部件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM