var r = this.store.getAt(rowIndex);
- if(!this.multiple){
- Roo.each(this.touchViewListGroup.select('.list-group-item > .roo-combobox-list-group-item-box > input:checked', true).elements, function(c){
- c.dom.removeAttribute('checked');
- }, this);
-
- row.select('.roo-combobox-list-group-item-box > input', true).first().attr('checked', true);
-
- this.setFromData(r.data);
-
- var close = this.closeTriggerEl();
+ if(this.fireEvent('beforeselect', this, record, index) !== false){
- if(close){
- close.show();
- }
-
- this.hideTouchView();
-
- this.fireEvent('select', this, r, rowIndex);
+ this.setFromData(index > -1 ? record.data : false);
- return;
- }
-
- if(this.valueField && typeof(r.data[this.valueField]) != 'undefined' && this.getValue().indexOf(r.data[this.valueField]) != -1){
- row.select('.roo-combobox-list-group-item-box > input', true).first().dom.removeAttribute('checked');
- this.tickItems.splice(this.tickItems.indexOf(r.data), 1);
- return;
+ this.collapse();
+ this.fireEvent('select', this, record, index);
}
-
- row.select('.roo-combobox-list-group-item-box > input', true).first().attr('checked', true);
- this.addItem(r.data);
- this.tickItems.push(r.data);
-
}