PDA

View Full Version : "scroll"-property on "List"s



alexbr
17 Mar 2011, 2:14 AM
Hi.

The documentation of the "List"-class states you can provide a scroller-configuration to the "scroll"-property. http://dev.sencha.com/deploy/touch/docs/?class=Ext.List

However, the "initComponent" of List does the following.



if (this.scroll !== false) {
this.scroll = {
direction: 'vertical',
useIndicators: !this.indexBar
};
}


If it's intentional to disregard the user's scroll-configuration, then I think the docs should be updated. In my opinion, though, the user's scroll-configuration should be merged with the defaults for "direction" and "useIndicators".

I need to be able to supply listeners to the scroll-event, to implement "infinite scrolling". My workaround at the moment is subclassing "List" and merging the scroll-properties.

mitchellsimoens
17 Mar 2011, 5:19 AM
I would have to agree it should use Ext.applyIf to merge. In the mean time, you can override the initComponent to do as you wish.