PDA

View Full Version : [FIXED-201] Store.filter Broken



cnelissen
5 Aug 2010, 8:13 AM
This code works fine in 0.91, but is broken in 0.92 and 0.93. Here is a demo of the issue.



<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Store Filter Test</title>
<script type="text/javascript" src="../../ext-touch-debug.js"></script>
<script type="text/javascript">
Ext.setup({
onReady: function() {
Ext.regModel('Test', {
fields: ['name','category']
});
var dataStore = new Ext.data.Store({
model: 'Test',
data: [
{name: 'Test 1', category: 'category-1'},
{name: 'Test 2', category: 'category-1'},
{name: 'Test 3', category: 'category-2'},
{name: 'Test 4', category: 'category-2'},
{name: 'Test 5', category: 'category-3'},
{name: 'Test 6', category: 'category-3'}
]
});
console.log(dataStore.filters, dataStore.data);
dataStore.filter({property: 'category', value: 'category-1'});
console.log(dataStore.filters, dataStore.data);
}
});
</script>
</head>

<body>
</body>
</html>


Expected output, 2 records. Actual output, 0 records.

Jamie Avins
5 Aug 2010, 8:22 AM
Thank you for the report.

edspencer
3 Sep 2010, 5:51 PM
This has now been fixed and will appear in the next release