#623 se-input changes event trigger issue fixed

master
agriyadev5 2021-08-26 17:43:33 +05:30
parent cc2bbde8e1
commit 2414f85f4a
1 changed files with 7 additions and 2 deletions

View File

@ -154,11 +154,16 @@ export class SEInput extends HTMLElement {
* @returns {void}
*/
connectedCallback () {
this.addEventListener('change', (e) => {
this.$input.addEventListener('change', (e) => {
e.preventDefault();
this.value = e.target.value;
this.dispatchEvent(this.$event);
});
this.$input.addEventListener('keyup', (e) => {
e.preventDefault();
this.value = e.target.value;
this.dispatchEvent(this.$event);
});
this.dispatchEvent(this.$event);
}
}
// Register