[A3R4] Single Event Bug - Ext JS

本文描述了一个关于DS组件加载事件的问题,当两个加载事件被设置时,其中一个事件仅首次触发后便不再响应。这导致了分页功能无法正常工作,如显示记录范围的文字更新不正确、加载动画无法切换等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This:

          ds.on('load', function() {
              var count = ds.getCount();
              var msg = count == 0 ?
                  'Data not available for this view.' :
                  String.format(
                      'Displaying {0} - {1} of {2}',
                      paging.cursor + 1, paging.cursor + count, ds.getTotalCount()
                  );
              displayInfo.update(msg);
              fewer.setDisabled(paging.pageSize <= 20);
              more.setDisabled(paging.pageSize >= ds.getTotalCount());
          });
followed by this:

          ds.on('load', function() {
            grid.getView().autoSizeColumns(); 
          }, false, { single: true });
results in the first only ever firing the first time and never firing again. It's like the single event is also causing the other to be removed as well. I don't have time to set any BPs right now and dig into the problem deeper, but thought maybe getting this much out would be helpful.

Jack, you can see this in the ondemand system I've shown you a couple of times recently. All of the list features (list contacts, list tenants, etc.) suffer from this. You can't page through the grid like you should be able to and have the "Displaying {0} to {1} of {2}" text updated properly, the loading anim doesn't get swapped back to the non-anim version, the pageNumber in the paging input doesn't get updated/incremented/decremented, etc.

If I comment out the second call that's intended to be a single event execution, the other works as it should.
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值