From: edward Date: Mon, 25 Apr 2016 05:47:17 +0000 (+0800) Subject: Roo/bootstrap/ComboBox.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=6d553f1e80e82db26f3ac87698735213d8b91ac6;p=roojs1 Roo/bootstrap/ComboBox.js --- diff --git a/Roo/bootstrap/ComboBox.js b/Roo/bootstrap/ComboBox.js index f8aa32a415..e206957b98 100644 --- a/Roo/bootstrap/ComboBox.js +++ b/Roo/bootstrap/ComboBox.js @@ -2314,14 +2314,16 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { this.store.data.each(function(d, rowIndex){ var row = this.touchViewListGroup.createChild(template); - - if(this.displayField && typeof(d.data[this.displayField]) != 'undefined'){ - row.select('.roo-combobox-list-group-item-value', true).first().dom.innerHTML = d.data[this.displayField]; + var cfg = { + html : d.data[this.displayField] + } + + if(this.fireEvent('touchviewdisplay', this, cfg) !== false){ + row.select('.roo-combobox-list-group-item-value', true).first().dom.innerHTML = cfg.html; + } } - - if(!this.multiple && this.valueField && typeof(d.data[this.valueField]) != 'undefined' && d.data[this.valueField] == this.getValue()){ row.select('.roo-combobox-list-group-item-box > input', true).first().attr('checked', true); }