This:
followed by this:
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.
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());
});
ds.on('load', function() {
grid.getView().autoSizeColumns();
}, false, { single: true });
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.

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

被折叠的 条评论
为什么被折叠?



