PDA

View Full Version : [CLOSED] [#213] Problem with storeHasSelected



zwf
Apr 18, 2013, 10:25 AM
Hi there,

I ran into a problem when switching to ext.net 2.2 :

I'm applying a filter to a store of a gridpanel via a combobox.

ext.js seems not to have
records.length anymore.

I searched and found an open bug with a fix:
http://www.sencha.com/forum/showthread.php?258397


storeHasSelected: function(record) {
var store = this.store,
records,
len, id, i;

if (record.hasId() && store.getById(record)) {
return true;
} else {
records = store.data.items;
len = records ? records.length : 0; //<------- fix
//len = records.length; //<------- problem
id = record.internalId;

for (i = 0; i < len; ++i) {
if (id === records[i].internalId) {
return true;
}
}
}
return false;
}


var applyFilter = function (field, dataIndex) {
//var store = App.gridPanel_ES_EinsatzVollstaendig.getStore();
var gridPanelComponent = field.up().up().up().up();
var store = gridPanelComponent.getStore();
var valueToFilter = field.getValue();
store.filter({
property: dataIndex,
value: valueToFilter,
exactMatch: true,
caseSensitive: true
});
//store.filter(dataIndex, valueToFilter);
if (isDebug) {

}
};


It seems to fix the problem, but the bug is still open at sencha.

When will the fix be included to ext.net ?

Regards,
Holger

Daniil
Apr 18, 2013, 10:41 AM
Hi Holger,



When will the fix be included to ext.net ?


I think when it is fixed on Sencha side. For now, please use a temp fix.

I created an Issue to track this defect.
https://github.com/extnet/Ext.NET/issues/213

zwf
Apr 18, 2013, 10:43 AM
Hi Holger,



I think when it is fixed on Sencha side. For now, please use a temp fix.

I created an Issue to track this defect.
https://github.com/extnet/Ext.NET/issues/213

You're so fast ;)

Regards,
Holger

Baidaly
May 30, 2013, 6:43 AM
Hello!

The issue appears to be fixed in the SVN trunk. Please update.