-
20 Feb 2013 9:11 AM #1
"scrollDocked" items inside a list will render inside the first list item
"scrollDocked" items inside a list will render inside the first list item
As the subject says.
A docked item should be rendered outside the first item.
Test case here:
http://new.senchafiddle.com/#/l3e2N/
-
20 Feb 2013 12:14 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
This is expected behavior and not a bug.
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.
-
21 Feb 2013 12:22 AM #3
So what's the best way to add an element at the beginning of a grouped list and make it scroll with it?
-
21 Feb 2013 6:33 AM #4
You guys are aware that this produces some odd side effects, right?
Such as, it is hard to get a disclosure icon to align correctly in the first list item when the scrollDocked items are added to it, the scrollDocked items get (visually) selected along with the first list item, the scrollDocked items do not show up if the list is empty, and there is no ability to have multiple lists stacked vertically in a view without setting a fixed height.
I'm sure that one can find work-arounds for most of this but it starts to feel like you are fighting against Sencha Touch rather than being enabled by it.
EDIT: One other oddity to add, the list group header for the first list item shows up above scrollDocked items.
-
22 Feb 2013 6:54 AM #5
-
12 Mar 2013 3:08 AM #6
I haven't tested it yet, but seems that this has been fixed in Touch 2.2.0 beta 1, as stated by the release notes:
http://cdn.sencha.com/touch/sencha-t...ase-notes.html
While I'm happy it has been fixed, I have to say that the way submitted bugs are managed is very questionable.Updated List to have headers not be nested inside the ListItem
Anyway, thanks to the Sencha team.
-
30 Mar 2013 3:36 PM #7
I'm having the same issue and I don't think this should be the normal behavior as mitchellsimoens mentions.
I'm using Sencha Touch 2.2 RC.
In Sencha Touch 2.0.1 this scenario was handled correctly, since any item added to a list (via the items config property), was inserted outside the list items.
The scenario that I have is the following:
The Main View needs to display a list of articles, which are grouped by Section, but inside this same view I need to display a Carousel at the top, which also contains articles but from a "featured" Section.
The way the scrollDocked items are being inserted in Sencha Touch 2.2 RC doesn't allow me to do this.
Sencha Fiddle Result:
http://api.senchafiddle.com/v3/full/kC5vu/
Code:Ext.Loader.setConfig({ enabled : true }); Ext.application({ name : ('SF' || 'SenchaFiddle'), launch : function() { Ext.create('Ext.List', { fullscreen : true, grouped: true, scrollable: { direction: 'vertical', directionLock: true }, items: [{ xtype: 'carousel', scrollDock: 'top', height: 300, padding: 20, items: [ { html: 'This is also an Article but it belongs to the Featured Section and it is presented in a Carousel</br></br>But the group header will confuse users, since it says Entertainment' }, { html: 'Another Article that belongs to the Featured Section and is presented in a Carousel' } ], style: 'background: green; border: 1px solid silver; color: white' }], store: { grouper: 'group', data: [ { text: 'Article 1', group: 'Sports' }, { text: 'Article 2', group: 'Sports' }, { text: 'Article 3', group: 'Entertainment' }, { text: 'Article 4', group: 'Entertainment' }, { text: 'Article 5', group: 'Entertainment' }, { text: 'Article 6', group: 'Entertainment' }, { text: 'Article 7', group: 'Fashion' }, { text: 'Article 8', group: 'Fashion' }, { text: 'Article 9', group: 'Fashion' }, { text: 'Article 10', group: 'Fashion' }, { text: 'Article 11', group: 'Fashion' }, { text: 'Article 12', group: 'Fashion' }, { text: 'Article 13', group: 'Fashion' }, { text: 'Article 14', group: 'Fashion' } ] } }); } });
Technically it might not be a bug, but as others in the post have mentioned, this should not be the normal behavior.
Is there any workaround for this?. How could I create an UI like the one I mention (the Carousel being outside of the list items)?.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote