Hi friends,

I suggest not to hide tree nodes while filtering, you can keep the snapshot of the store response jsondata and always use it by filtering and applying to the TreeStore. Today I was needing something like and developed a picker with treePanel with instant search while typing in picker. Here is solution.

Code:
Ext.define('Ext.vcops.GroupPickerComboBox', {


    extend : 'Ext.form.field.Picker',


    initMembers : function() {
        this.treePanel = Ext.create('Ext.tree.Panel', {
            floating: true,
            useArrows: true,
            rootVisible: false,
            maxHeight: 400,
            autoScroll: true,
            border: false,
            listeners: {
                scope: this,
                select: function (scope, record, index, eOpts) {
                    this.setValue(record.data);
                },
                beforeselect: function (scope, record, index, eOpts) {
                    return record.data.leaf;
                },
                celldblclick : function(scope, td, cellIndex, record) {
                    if (record.data.leaf) {
                        this.collapse();
                    }
                }
            },
            store: Ext.create('Ext.data.TreeStore', {
                fields: ['id', 'text', 'type', 'typeId']
            })
        });


        this.searchTask = new Ext.util.DelayedTask();
    },


    createPicker: function() {
        return this.treePanel;
    },


    setValue : function(value) {
        this.lastSelectedRecord = value;
        this.callParent([value != null ? value.text : null]);
        this.fireEvent('configChange');
    },


    getValue : function() {
        return this.lastSelectedRecord;
    },


    getNodeById : function(id) {
        return this.treePanel.getStore().getNodeById(id);
    },


    searchTree: function(treePanel, field) {
        var data = Ext.decode(this.snapshot);
        var groupTypes = data.groupTypes;
        this.rootNode.children = this.getFilteredChildrens(field.getRawValue(), groupTypes);
        treePanel.getStore().setRootNode(this.rootNode);
        if (this.rootNode.children.length > 0) {
            this.suspendEvent('expand');
            this.expand();
            this.resumeEvent('expand');
            treePanel.expandAll();
        }
        this.focus();
    },


    getFilteredChildrens : function(searchKey, childrens) {
        var matches = [];
        for (var i in childrens) {
            if (childrens[i].leaf) {
                if (childrens[i].text.indexOf(searchKey) >= 0) {
                    childrens[i].text = childrens[i].text.replace(searchKey, "<span style='background-color:#EBE04D;'>" + searchKey + "</span>");
                    matches.push(childrens[i]);
                }
            } else {
                if (childrens[i].text.indexOf(searchKey) >= 0) {
                    childrens[i].text = childrens[i].text.replace(searchKey, "<span style='background-color:#EBE04D;'>" + searchKey + "</span>");
                    this.highlightMatchingChildes(searchKey, childrens[i].children);
                    matches.push(childrens[i]);
                } else {
                    childrens[i].children = this.getFilteredChildrens(searchKey, childrens[i].children, this);
                    if (childrens[i].children.length > 0) {
                        matches.push(childrens[i]);
                    }
                }
            }
        }
        return matches;
    },


    highlightMatchingChildes : function(searchKey, childrens) {
        for (var i in childrens) {
            if (childrens[i].leaf) {
                if (childrens[i].text.indexOf(searchKey) >= 0) {
                    childrens[i].text = childrens[i].text.replace(searchKey, "<span style='background-color:#EBE04D;'>" + searchKey + "</span>");
                }
            } else {
                childrens[i].text = childrens[i].text.replace(searchKey, "<span style='background-color:#EBE04D;'>" + searchKey + "</span>");
                childrens[i].children = this.getFilteredChildrens(searchKey, childrens[i].children, this);
            }
        }
    },


    loadData : function() {
        Ext.Ajax.request({
            url : 'utility.action',
            params : { mainAction : 'getJsonTree' },
            disableCaching : true,
            scope : this,
            success : function(response) {
                this.snapshot = this.snapshot || response.responseText;
                var data = eval('(' + response.responseText + ')');
                if (!this.rootNode) {
                    this.rootNode = Ext.create('Ext.data.NodeInterface');
                }
                this.fireEvent('dataReady');
            }
        });
    },


    getTreeCompleateData : function() {
        var data = Ext.decode(this.snapshot);
        var rootGroupTypes = data.groupTypes;
        return rootGroupTypes;
    },


    initComponent : function() {
        this.initMembers();
        var config = {
            allowBlank: true,
            width: 250,
            enableKeyEvents: true,
            listeners: {
                scope: this,
                expand: function() {
                    this.rootNode.children = this.getTreeCompleateData();
                    this.treePanel.getStore().setRootNode(this.rootNode);
                    if (this.lastSelectedRecord != null && this.getRawValue() != null && this.getRawValue().length > 0) {
                        var targetRecord = this.treePanel.getStore().getRootNode().findChild('id', this.lastSelectedRecord.id, true);
                        if (targetRecord != null && targetRecord.get('text') == this.getRawValue()) {
                            targetRecord.parentNode.expand();
                            this.treePanel.getSelectionModel().select(targetRecord, false, true);
                        }
                    }
                },
                keyup: function(field, event) {
                    this.collapse();
                    this.searchTask.cancel();
                    this.searchTask.delay(1000, this.searchTree, this, [this.treePanel, field]);
                }
            }
        };
        this.on('afterrender', this.loadData);
        this.addEvents('dataReady');
        this.addEvents('configChange');
        Ext.apply(this, Ext.apply(config, this.initialConfig));
        Ext.vcops.GroupPickerComboBox.superclass.initComponent.apply(this, arguments);
    }
});