1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    San Mateo, CA, USA
    Posts
    8
    Vote Rating
    0
    jkobilka is on a distinguished road

      0  

    Default Answered: Can't disable list scrolling

    Answered: Can't disable list scrolling


    UPDATE: I failed to mention that this issue (bug?) only recently appeared when I upgraded my project to ST 2.1 from 2.0.

    I'm having an issue with disabling list scrolling when the list is a child item of another container. Specifically, I've got the list as a child with other objects above and below it (i.e. the list doesn't fill the screen), so what I want to do is to have the list NOT scroll, but rather scroll with the parent container.

    The issue is that this child list apparently ignores the "scrollable: false" and sets the list as scrollable anyway, so I often get a double scroll.

    I can get around this issue (see below), but my larger issue is that because ST is ignoring my "DO NOT SCROLL" request, it's wrapping a scroller around the list, preventing me from applying some desired CSS.

    What I'm ultimately trying to do is apply some CSS rules that will physically and visually separate the list items. However, it appears that the scroller that Sencha's forcing on my list is preventing this. Read on...

    I'm aware that this is a very similar problem to this: http://www.sencha.com/forum/showthread.php?249032, but I'm more concerned with the DOM elements that are rendered rather than the scrolling behavior itself. I can basically achieve the same effect by setting the scroll to horizontal:

    Code:
    config: {
    ...
    scrollable: {
        direction: 'horizontal',
        directionLock: true
    }
    ...
    }
    ... but the issue is that regardless, the list is wrapped in a scroller, and the positions of each list item are governed by some CSS transform positioning rules, thus ignoring any margin I apply to the list items. This happens even if I set scrollable: false, suggesting that ST is ignoring this config definition.

    Sorry this is a bit confusing. I've attached a screenshot that I hope will help a bit.

    Any suggestions?
    Attached Images

  2. Since the list supports infinite scrolling there is no direct relationship of a record to a dom element. The list depends on the scroller to know to render more records. I also do not believe it supports horizontal scrolling.

    To work around this, you can use a DataView and style it to be what you need.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    Since the list supports infinite scrolling there is no direct relationship of a record to a dom element. The list depends on the scroller to know to render more records. I also do not believe it supports horizontal scrolling.

    To work around this, you can use a DataView and style it to be what you need.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    San Mateo, CA, USA
    Posts
    8
    Vote Rating
    0
    jkobilka is on a distinguished road

      0  

    Default


    Thanks, Mitchell. I figured it didn't support horizontal scrolling, which is why I used it to 'hack' the list to stop scrolling vertically, since scrollable: false didn't disable the vertical scrolling (as I expected it to).

    At any rate, the dataview seems to do the trick, as it appears to respect the scrollable: false property. I hadn't used that before, but it seems perfect. Thank you!

Thread Participants: 1