在煎茶触摸2
答
数据视图和列表直接绑定到百货(Ext.data.Store
) 。因此,该商店发生的任何事情都会反映在视图中。
所以你需要做的是过滤器的商店。您可以通过在商店上使用filter
或filterBy
方法来完成此操作。
的更多信息:http://docs.sencha.com/touch/2-0/#!/api/Ext.data.Store-method-filter
例
var store = Ext.create('Ext.data.Store', {
fields: ['text'],
data: [
{ text: 'one'},
{ text: 'two'},
{ text: 'three'}
]
});
store.filter('text', 'one'); // will only show the one record
你是什么'searcher'是什么意思? – 2012-04-16 18:18:52
类似这样:[示例搜索列表](http://dev.sencha.com/deploy/touch/examples/production/list-search/index.html) – sneyder05 2012-04-16 20:11:05