View Full Version : Remove xindex from record

5 Sep 2012, 2:20 AM

I load the contents of a list from a store.

{ xtype: 'list',
store: 'Items',
itemTpl: '{name}'

The model of an item has basically an id and a name. I then listen to the select event on the list in a controller.

onItemSelection: function(dataview, record, eOpts) {

My problem right now is that the captured record has an added property : "xindex". It's also only true for the first element of the list, all other items don't have this property added to their data.

Is there any way to tell Sencha not to add this property ? I know I can just get the raw data from the item and construct a new record with it before my manipulations but I'd rather not if possible.

Thanks :)

PS : The xindex property is added to the first record of the store when the store is referenced by a list via the store property.

5 Sep 2012, 2:43 AM
in the docs live preview I'm using:


Ext.create('Ext.view.View', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
emptyText: 'No images available',
renderTo: Ext.getBody(),
multiSelect: true,
listeners : {
selectionchange : function(dataview, record, eOpts) {
//console.log(dataview, record,eOpts);
Ext.each(record, function(item,index,objs) {
console.log('--> ',item,index,objs,'---',item.getData());

I'm just seeing records here? Are you doing something different?