Ext 的 combox里面的triggerAction typeAhead typeAheadDelay是做什么的?

liuchuanefeng2006 2008-07-14 11:47:21
如题:Ext 的 combox里面的triggerAction typeAhead typeAheadDelay三个属性是做什么的?
他们代表什么意思?
上网查了很多资料,都是例子。没讲他们起到了什么作用

例如我模仿做的例子
typeAhead: true,
triggerAction: 'all',

我将typeAhead: true,改为false,triggerAction: 'all', 改为query,没看出结果有什么变化啊,
感谢各位高手的帮助啊

...全文
2005 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
licip 2010-01-26
  • 打赏
  • 举报
回复
triggerAction 用all表示把下拉框列表框的列表值全部显示出来,如果用query,如果你做了一次选择,第二次再去用,按第一次输入的值,它只显示匹配出来的。
jzdzhiyun 2008-10-04
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 blackparadise 的回复:]
typeAhead相当于自动匹配的开关,就像google的查询搜索框,输入前面自动提示
typeAheadDelay就是前面功能的一个延时控制功能,控制你按键后都长时间开始自动的匹配

triggerAction 不知道

个人理解
[/Quote]
回答是正确的,但typeAhead,typeAheadDelay有效果的前提是:加了readOnly:false或者不写这个属性。
我也很想知道triggerAction 是什么作用的。api说用'all'.全国人民的例子也是:triggerAction:all.
我想只显示第2条以后的记录怎么办啊
liuchuanefeng2006 2008-07-17
  • 打赏
  • 举报
回复
谢谢1楼和2楼的朋友,其实我当然也能看Ext的Api,问题是我英文也不好。。。
2楼的朋友讲的我得回去试试才能结分啊,呵呵,
因为我是个固执的完美主义者。。。
请大家再帮忙看看还有没有更好的解释。
blackparadise 2008-07-17
  • 打赏
  • 举报
回复
typeAhead相当于自动匹配的开关,就像google的查询搜索框,输入前面自动提示
typeAheadDelay就是前面功能的一个延时控制功能,控制你按键后都长时间开始自动的匹配

triggerAction 不知道

个人理解
leadergg 2008-07-16
  • 打赏
  • 举报
回复
找到的是ext api上的说法,我英语不好,就不给你翻译了,免得误导了你。
typeAhead
typeAhead : Boolean
True to populate and autoselect the remainder of the text being typed after a configurable delay (typeAheadDelay) if it matches a known value (defaults to false)
This config option is defined by ComboBox.


triggerAction
triggerAction : String
The action to execute when the trigger field is activated. Use 'all' to run the query specified by the allQuery config option (defaults to 'query')
This config option is defined by ComboBox.


typeAheadDelay
typeAheadDelay : Number
The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true (defaults to 250)
This config option is defined by ComboBox.

52,799

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧