Make FilteringSelect closable on blur only
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.0/dijit/themes/claro/claro.css">
<select id="deptSelector"></select>
<div id="output"></div>
JavaScript
require(['dojo/_base/declare', 'dijit/form/FilteringSelect',
'dijit/popup',
'dijit/registry',
'dojo/html',
'dojo/store/Memory',
'dojo/domReady!'], function (declare, FilteringSelect, popup, registry, html, Memory) {
var CustomFilteringSelect = declare([FilteringSelect], {
closeDropDown : function(/* Boolean */ focus){
console.log("Not closing");
},
postCreate : function(){
this.inherited(arguments);
}
});
var departments = new Memory({
data: [{
id : 1,
name: "Childcare Department",
email: "[email protected]"
}, {
id : 2,
name: "Health Goods Department",
email: "[email protected]"
}, {
id : 3,
name: "Medicine Department",
email: "[email protected]"
}, {
id : 4,
name: "Customer Service",
email: "[email protected]"
}, {
id : 5,
name: "Other Department",
email: "[email protected]"
},
{
id : 2,
name: "Health Goods Department",
email: "[email protected]"
}, {
id : 3,
name: "Medicine Department",
email: "[email protected]"
}, {
id : 4,
name: "Customer Service",
email: "[email protected]"
}, {
id : 5,
name: "Other Department",
email: "[email protected]"
},
{
id : 2,
name: "Health Goods Department",
email: "[email protected]"
}, {
id : 3,
name: "Medicine Department",
email: "[email protected]"
}, {
id : 4,
name: "Customer Service",
email: "[email protected]"
}, {
...