Reputation: 4581
I'm trying to search for a particular field based on what a user searches in a textfield. For instance:
items: [
{ xtype: 'panel', padding: 5, height: 500, width: '35%',
items: [
{ xtype: 'textfield', padding: 5, region: 'west', fieldLabel: 'Criteria 1', itemId: 'criteria_1' }, ...
And here's code from my view class:
store.filter('KBE_ID', '#criteria_1');
I want to return a filtered search that uses the value of my textfield. Could this be done by giving it an itemId?
Upvotes: 0
Views: 358
Reputation: 4405
Get your reference to the field using the itemId
, then do the filter using getValue()
:
var searchField = myPanel.down('#criteria_1');
store.filter('KBE_ID', searchField.getValue());
Upvotes: 2