Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    1
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,339
    Answers
    3887
    Vote Rating
    1297
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    Jan 2012
    Posts
    17
    Vote Rating
    1
      0  

    Default

    Works, Thank you!

Tags for this Thread

Posting Permissions

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