1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    16
    Vote Rating
    0
    rutzmic is on a distinguished road

      0  

    Default Answered: ListPaging loadMore Component is added to last ListItem in Sencha Touch 2.1

    Answered: ListPaging loadMore Component is added to last ListItem in Sencha Touch 2.1


    There is a potential bug when using the ListPaging-Plugin together with the new Touch 2.1 List.
    It seems the LoadMoreComp is added to the last ListItem and not as last child directly to the list.

    The resulting DOM looks basically like this in a Touch 2.1 List with ListPaging:
    HTML Code:
    <div class="x-list-normal">
       ......
           <div class="x-list-item" >
               .... 
           </div>
            <div class="x-list-item" >
               .... 
           </div>
            <div class="x-list-item x-list-item-last" >
               <div class="x-dock-body">....</div> 
               <div class="x-list-paging"></div>
           </div>
       .....
    </div>
    In my opinion the "x-list-paging" should not be withing "x-list-item-last" as it makes it extremly hard to Style the ListPaging Component

  2. The way things are architected, we use the list item and just hide/show the list paging component. Just like when a list is grouped, the headers are within the list item. For styling, you shouldn't use the x-list-item element as it may have the header or list paging, you should use the x-dock-body element and you can use CSS to scope to the x-list-item-last like:

    Code:
    .x-list-item .x-dock-body {
        background-color: blue;
    }
    
    .x-list-item-last .x-dock-body {
        background-color: red;
    }

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    436
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    The way things are architected, we use the list item and just hide/show the list paging component. Just like when a list is grouped, the headers are within the list item. For styling, you shouldn't use the x-list-item element as it may have the header or list paging, you should use the x-dock-body element and you can use CSS to scope to the x-list-item-last like:

    Code:
    .x-list-item .x-dock-body {
        background-color: blue;
    }
    
    .x-list-item-last .x-dock-body {
        background-color: red;
    }
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    16
    Vote Rating
    0
    rutzmic is on a distinguished road

      0  

    Default


    Works, Thank you!