jQuery-Autocomplete icon indicating copy to clipboard operation
jQuery-Autocomplete copied to clipboard

add onChange callback function to fix onSelect and onChange conflicting

Open flyingtime opened this issue 9 years ago • 0 comments

Use onChange:

$('#autocomplete').autocomplete({
    serviceUrl: '/autocomplete/countries',
    onSelect: function (suggestion) {
        alert('You selected: ' + suggestion.value + ', ' + suggestion.data);
    },
    onChange: function (value) {
        console.log(value);
    }
});

flyingtime avatar Aug 15 '16 14:08 flyingtime