简体   繁体   English

如何在Mootools TextBoxList上使用addonblur设置?

[英]How can I use the addonblur setting on the Mootools TextBoxList?

I am using Mootools TextBoxList for a project. 我正在为项目使用Mootools TextBoxList I was attempting to set the addonblur option so new tags entered would automatically be added to the list when the text box looses focus. 我试图设置addonblur选项,以便在文本框失去焦点时自动将输入的新标签添加到列表中。 However, I am unable to determine the correct syntax for how to set this. 但是,我无法确定如何设置正确的语法。

I read the documentation several times and tried different things, but couldn't get it. 我阅读了几次文档,尝试了不同的方法,但是无法理解。 My current initialization looks like this: 我当前的初始化看起来像这样:

window.addEvent('load', function () {
var t = new TextboxList('txtAttributes', {unique: true, plugins: {autocomplete: {
     minLength: 3,
     queryRemote: true,
     remote: {url: 'tagssuggest'}
}}});

How can I modify this to include addonblur: true ? 我如何修改它以包括addonblur: true

Like this: 像这样:

var t = new TextboxList('txtAttributes', {
  bitsOptions: {
    unique: true,
    editable: {
      addOnBlur: true
    },
    plugins: {
      autocomplete: {
        minLength: 3,
        queryRemote: true,
        remote: {url: 'tagssuggest'}
      }
    }
  }
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM