Results 1 to 4 of 4

Thread: list scrollable=false doesn't work

  1. #1
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Vote Rating
    1
      0  

    Default list scrollable=false doesn't work

    [edit]
    the problem seems to be a list is always scrollable, even if scrollable is set to false on the list (!), therefore the list does not get a height depending on its items.

    Is there a workaround for this behaviour?
    [/edit]


    Hi,

    In my Sencha Touch 2.0 app, I had a view with the following structure:
    Code:
    - container (scrollable = vertical)
        - container (fixed height, contains image in html)
        - list (scrollable = false, has dynamic height depending on amount of items)
    Both containers and the list had a layout = default. This allowed the user to scroll the entire view, the top image and list would scroll.

    Since I upgraded my project to Touch 2.1, this approach doesn't seem to work any more. Only the image in the container is shown, the container seems to have gotten the same height as it's parent (the top container). The list has got a height of zero (used to be; as high as needed to display all items).

    Question:
    what structure do I need to set up to be able to scroll both the image and the list at the same time?

  2. #2
    Sencha - Documentation Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    412
    Vote Rating
    79
      1  

    Default

    If I understand your question properly, the solution in Touch 2.1 is to add a component as an item of the list. Then attach it to the bottom or the top of the of the list by utilizing a config called scrollDock (currently undocumented).

    You should be able to do something like this:

    Code:
    Ext.create('Ext.dataview.List', {    
        store   : store,
        itemTpl : '{field1}',
        items   : [
            {
                xtype       : 'textfield',
                label       : 'TestField',
                placeHolder : 'Enter the field value',
                scrollDock  : 'top',
                docked      : 'top'
            },
            {
                xtype      : 'fieldset',
                title      : 'Test Area',
                margin     : '0 2em',
                scrollDock : 'bottom',
                docked     : 'bottom',
                items      : [
                    {
                        xtype       : 'textfield',
                        label       : 'Test',
                        placeHolder : 'Enter test value'
                    }
                ]
            }
        ]
    });
    That said, you cannot currently add children to a list in Architect. I believe that is due to be changed in the next release.

  3. #3
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Vote Rating
    1
      0  

    Default

    I solved the problem by converting my list into a dataview. Works for now. Thanks for taking the time to respond.

  4. #4
    Sencha - Documentation Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    412
    Vote Rating
    79
      0  

    Default

    That's wonderful news! Thanks for the update.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •