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,556
    Answers
    3932
    Vote Rating
    1272
      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! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  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
  •