-
12 Nov 2012 5:53 AM #1
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:
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 ComponentHTML 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>
-
Best Answer Posted by mitchellsimoens
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; }
-
12 Nov 2012 11:05 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
- Answers
- 3113
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.
-
20 Nov 2012 5:18 AM #3


Reply With Quote