PDA

View Full Version : Cannot Get List to scroll



eggzamummy
9 May 2012, 3:39 AM
I have been working on this for hours and cannot get the List component to scroll like in the example in the Documentation. I've tried countless different combinations of settings, web environnments (local, hosted, etc) and cannot get it to work. When I try to scroll it just pulls and snaps back.


Ext.define('Contact', {
extend: 'Ext.data.Model',
config: {
fields: ['firstName', 'lastName']
}
});

var store = Ext.create('Ext.data.Store', {
model: 'Contact',
sorters: 'lastName',

grouper: {
groupFn: function(record) {
return record.get('lastName')[0];
}
},

data: [
{ firstName: 'Tommy', lastName: 'Maintz' },
{ firstName: 'Rob', lastName: 'Dougan' },
{ firstName: 'Ed', lastName: 'Spencer' },
{ firstName: 'Jamie', lastName: 'Avins' },
{ firstName: 'Aaron', lastName: 'Conran' },
{ firstName: 'Dave', lastName: 'Kaneda' },
{ firstName: 'Jacky', lastName: 'Nguyen' },
{ firstName: 'Abraham', lastName: 'Elias' },
{ firstName: 'Jay', lastName: 'Robinson'},
{ firstName: 'Nigel', lastName: 'White' },
{ firstName: 'Don', lastName: 'Griffin' },
{ firstName: 'Nico', lastName: 'Ferrero' },
{ firstName: 'Jason', lastName: 'Johnston'}
]
});

Ext.application({
name: 'test',
launch: function() {
Ext.create('Ext.List', {
fullscreen: true,
itemTpl: '<div class="contact">{firstName} <strong>{firstName}</strong></div>',
store: store,
docked: 'top',
grouped: true
});
}
});

mitchellsimoens
11 May 2012, 6:40 AM
Remove docked : 'top' from the list.

eggzamummy
11 May 2012, 6:48 AM
Unfortunately still not working.

URL is http://www.bookingsimple.com/mobile.php

mitchellsimoens
11 May 2012, 7:44 AM
Worked for me with just your code.

eggzamummy
11 May 2012, 7:47 AM
Did you try hitting that link from a mobile device? When I hit it from an iPhone 4 it just snaps back, I can't scroll down to see the rest of the list.