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"
});
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With