Reputation: 211
When I set index in selectedItems properety in order to display preset value in igCombo, provided itemTemplate is not used for generating the text value.
$(selector).igCombo({
dataSource: this.userComboDs,
width: '300px',
textKey: 'line1',
valueKey: 'id',
mode: 'dropdown',
enableClearButton: false,
closeDropDownOnSelect: true,
itemTemplate: "<span>${city}, ${line1}</span>",
selectedItems: [
{
index: 1 // random index value
}],
selectionChanged: function (evt, ui){
},
filteringType: "local",
filterCondition: "contains",
renderMatchItems: "contains"
});
Upvotes: 3
Views: 1402
Reputation: 34905
The itemTemplate
is only applicable to the items in the igCombo
list. The input field of the igCombo
is populated with the text key data property of the selected item.
Upvotes: 1