How to fireselectionChanged Event in igCombo only with mouse click?

1.2k views Asked by At

I am using infragistics combo box. The data is loaded into the combobox after rendering. I have turned on the auto-suggest feature. The problem is that when i start typing in the combobox, selectionChanged event is fired as the first item in the dropdown list is selected automatically. I only want the selectionChanged to be fired when a user selects options from the dropdown using mouse click or by pressing the enter. Following is the my render code for igCombo.

searchTextCombo && searchTextCombo.igCombo({    
        valueKey: "Value",    
        textKey: "Key",    
        multiSelection: "off",    
        enableClearButton: true,    
        closeDropDownOnSelect: true,    
        virtualization: true,   
        dataSource: configuration.testUrl,    
        showDropDownButton: false,    
        filteringType: "local",    
        filteringCondition: "contains",    
        highlightMatchesMode: "contains",    
        selectionChanged: function (evt, ui) {
        }
});
1

There are 1 answers

0
Konstantin Dinev On

If you don't want the selectionChanged event to fire on typing, then you need to set autoSelectFirstMatch to false. By default it's true.

searchTextCombo.igCombo({    
    valueKey: "Value",    
    textKey: "Key",    
    multiSelection: "off",    
    enableClearButton: true,    
    closeDropDownOnSelect: true,
    virtualization: true,   
    dataSource: configuration.testUrl,    
    showDropDownButton: false,    
    filteringType: "local",    
    filteringCondition: "contains",    
    highlightMatchesMode: "contains",
    autoSelectFirstMatch: false,
    selectionChanged: function (evt, ui) {
    }
});

Here's the API doc.