由商店填充的Dijit / ComboBox:禁用选项/项目

时间:2017-04-06 08:08:35

标签: javascript combobox dojo dijit.form

我正在使用带有数据存储区的Dijit / ComboBox来填充它,类似于Dojo中的这个示例:

var stateStore = new Memory({
    data: [
        {name:"Alabama", id:"AL"},
        {name:"Alaska", id:"AK"},
        {name:"American Samoa", id:"AS"},
        {name:"Arizona", id:"AZ"},
        {name:"Arkansas", id:"AR"},
        {name:"Armed Forces Europe", id:"AE"},
        {name:"Armed Forces Pacific", id:"AP"},
        {name:"Armed Forces the Americas", id:"AA"},
        {name:"California", id:"CA"},
        {name:"Colorado", id:"CO"},
        {name:"Connecticut", id:"CT"},
        {name:"Delaware", id:"DE"}
    ]
});

var comboBox = new ComboBox({
    store: stateStore,
    queryExpr: "*${0}*",
    searchAttr: "name",
});

domConstruct.place(comboBox.domNode, this.inputWrapper)

现在我想禁用stateStore中的某些选项,以便显示这些选项但不能选择。这是可能的,如果是这样的话?

0 个答案:

没有答案