Clearing Search Box on the click of X button which is inside it using extjs

3.1k Views Asked by At

Clearing Search Box on the click of X button which is inside it using extjs . It should also have mouse over states. Can anyone please help with the code or how to proceed. Any help would be appreciated.

Below is the code in which i want to add the functionality :-

var tools = [{
                xtype: 'label', 
                id: 'search-filter-label',
                text: 'Search'
            }, ' ', {
                xtype: 'textfield',
                id: 'search-filter',
                selectOnFocus: true,
                width: 100,
                listeners: {
                    'render': {fn:function(){
                        Ext.getCmp('search-filter').getEl().on('keyup', function(){
                            this.filter();
                        }, this, {buffer:50});
                    }, scope:this}
                }
        }];
2

There are 2 best solutions below

2
On
0
On

check out these link:

Code: learnsomethings.com/fcps_checks/js/app.js

Working Example: learnsomethings.com/fcps_checks/index.html