带复选框且支持搜索功能的下拉列表10
// private onEmptyResults : function() { this.collapse(); }, /** * Returns true if the dropdown list is expanded, else false. */ isExpanded : function() { return this.list && this.list.isVisible(); }, selectByValue : function(v, scrollIntoView) { if (v !== undefined && v !== null) { var r = this.findRecord(this.valueField || this.displayField, v); if (r) { this.select(this.store.indexOf(r), scrollIntoView); return true; } } return false; }, select : function(index, scrollIntoView) { this.selectedIndex = index; this.view.select(index); if (scrollIntoView !== false) { var el = this.view.getNode(index); if (el) { this.innerList.scrollChildIntoView(el, false); } } }, // private selectNext : function() { var ct = this.store.getCount(); if (ct > 0) { if (this.selectedIndex == -1) { this.select(0); } else if (this.selectedIndex < ct - 1) { this.select(this.selectedIndex + 1); } } }, // private selectPrev : function() { var ct = this.store.getCount(); if (ct > 0) { if (this.selectedIndex == -1) { this.select(0); } else if (this.selectedIndex != 0) { this.select(this.selectedIndex - 1); } } }, // private onKeyUp : function(e) { if (this.editable !== false) { this.lastKey = e.getKey(); this.dqTask.delay(this.queryDelay); } }, // private validateBlur : function() { return !this.list || !this.list.isVisible(); }, // private initQuery : function() { this.doQuery(this.getRawValue()); }, // private doForce : function() { if (this.el.dom.value.length > 0) { this.el.dom.value = this.lastSelectionText === undefined ? '' : this.lastSelectionText; this.applyEmptyText(); } },