带复选框且支持搜索功能的下拉列表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();
}
},
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值