If you are using Classic toolkit, there are already created tools.
Check this example http://examples.sencha.com/extjs/6.5...grid-filtering
Unfortunately Modern doesn't have this implemented yet.
Basically only thing you need to to do is:
Code:
plugins:'gridfilters',
Which enables the filtering in the grid.
And than add type of filter to the column :
Code:
columns:[{
dataIndex:'id',
text:'Id',
width:50,
// Specify that this column has an associated Filter. This is
// processed by the gridfilters plugin. If this is a string,
// this is the type of filter to apply.
filter:'number'
},{
dataIndex:'company',
text:'Company',
flex:1,
// As an object, the type property indicates the type of filter to
// apply. All other properties configure that filter instance.
filter:{
type:'string',
itemDefaults:{
emptyText:'Search for...'
}
}}