-
12 Sep 2012 11:57 AM #1
Lists are always scrollable
Lists are always scrollable
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.1b3
Browser versions tested against:- Chrome/Mac 21.0.1180.89
DOCTYPE tested against:- html
Description:- Setting "scrollable: false" in a List no longer prevents scrolling, like it did in beta 1.
Steps to reproduce the problem:- In examples/list/app.js, add "scrollable: false," to the object returned at the end (line 118).
The result that was expected:- The list doesn't scroll.
The result that occurs instead:- The list still scrolls.
Test Case:
See above.
HELPFUL INFORMATION
Screenshot or Video:- None
See this URL for live test case: http://
Debugging already done:- This works in beta 1; the list doesn't scroll there.
Possible fix:- not provided
Additional CSS used:- only default ext-all.css
Operating System:- ________
- WinXP Pro
-
12 Sep 2012 1:17 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Thanks for the report! We'll make this possible.
-
12 Sep 2012 4:19 PM #3
Thanks. Just to clarify, in beta 1, a list had its own height, based on the total height of the items. So if you turned off scrollability, you could have the list take up as much room as it needed, but no more. That's the behavior that I'm hoping to get back. I assume this was changed because of the infinite-scrolling feature, in which case you obviously can't know the total height of the items. But hopefully there's a way to tell it that you have a finite data store.
-
3 Oct 2012 6:15 PM #4
This is still happening in 2.1rc1. Does anyone know if there's a workaround? This makes it difficult to have a list inside a scrolling parent container, since you'll end up with two scrollbars.
-
4 Oct 2012 7:08 AM #5
I've got a similar issue. I have a container followed by a list, both inside a parent container. I want to scroll the parent container and not the list, so I set scrollable: true to the parent container and scrollable: false to the list. but the list it's rendered with height: 0.
This is working correctly on Sencha 2.0.1.1, not anymore with 2.1rc1
-
5 Oct 2012 5:50 AM #6
A work-around:
0. disable the scroller (on load)
1. set the data
2. get the number of items
3. calculate the height (if possible)
4. set the height
If you need to refresh the list - set the height to null, then - start over with the steps above
Something like this... still struggling with the first time the element is painted...
Code:scrollable: { scroller: { disabled: true } }, initialize: { fn: function () { this.on('refresh', function () { this.setHeight(null); }, this, {order: 'before'}); this.on('painted', function () { this.setHeight(this.getStore().getData().items.length*itemHeight); this.element.redraw(); }, this, {order: 'after'}); }, single: true }
-
5 Oct 2012 7:11 AM #7
I did some more research here...
Nut sure, but the problem probably occurs, since only fit layout is allowed for list components.
I believe, if the scroller is set to false, the layout should be default... But this is not allowed by design.
A real workaround is to use dataview instead of list.
-
5 Oct 2012 7:57 AM #8
A component is a component, and I should be able to put it in a container and let it overflow that container, no matter how much room it needs. What if the list was simply a multi-line paragraph that required me to set its height?
-
5 Oct 2012 10:54 AM #9
DataView does have this ability. Unfortunately I've been relying on Ext.ux.touch.grid, which recently changed to a List implementation.
-
8 Oct 2012 5:24 AM #10
Breaking a so widely used component in a minor release is a bad idea.
I'll stick with v2.0.1.1 until 2.1 exits the beta stage, but it's a shame we can't get to know what Sencha developers think is the right approach with the new list component, and if this behavior will stick in the final version or not.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote