javascript - KendoUI Autocomplete - Change event not firing when selecting the same thing twice -
kendoui autocomplete isn't allowing me select same item twice in row. if select item, select another, of course work, not back-to-back.
by placing this.trigger('change')
in select method of kendoautocomplete({}), work if click on item list itself, but if type in same thing , push enter, doesn't trigger change event.
- type anne, click on (notice adds body (change event fired))
- try again (nothing happens)
just example code: jsfiddle example
var autocomplete = $("#input").kendoautocomplete({ // other methods... select: function (e) { console.log('---select---'); // work if select same thing , select item // the dropdown list, // ** if push enter, won't trigger //this.trigger('change'); // <-- }, change : function (e) { console.log(' >> change'); $('body').append('<br>' + this.value()); } });
bit weird true, documentation says : change : "fired when value of widget changed user." means once type in anne , press enter value of control set "anne", once type in anne again , press enter value still same, no change no event. placing trigger select sounds me different event > fire when selected.
Comments
Post a Comment