This commit is contained in:
2026-01-28 12:33:00 +02:00
parent 01642b7f6f
commit 3e4992b0f7
+8 -7
View File
@@ -46,7 +46,7 @@ export class Autocomplete {
this.renderContainer();
this.setEvensts();
this.setEvents();
}
/**
@@ -64,7 +64,7 @@ export class Autocomplete {
/**
* Autocomplete, Set Events
*/
setEvensts() {
setEvents() {
// Input Event Handler
this.target.dxOn('input.autocomplete' + this.ekey, (e, t) => this.inputHandler(e, t));
@@ -132,11 +132,12 @@ export class Autocomplete {
}
}
let changed = this.value != matchId;
this.value = matchId;
const changed = matchId && this.value != matchId;
if (changed) {
this.value = matchId;
Ut.trigger(this.opts.onChange, this);
this.target.dxTrigger('changed');
}
@@ -232,13 +233,13 @@ export class Autocomplete {
*/
restoreValue(id) {
this.value = id;
if (id == this.value) {
this.clear();
return;
}
this.value = id;
this.target.value = this.data[id];
Ut.trigger(this.opts.onChange, this);