2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-05-17 03:59:38 +03:00

Fixes v-model syncing so clicking items still triggers a sync

This commit is contained in:
syropian
2020-07-02 17:11:08 -04:00
parent 082999b978
commit d46c0e0ee5
6 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ var VueTribute = {
this.tribute.attach($el);
$el.tributeInstance = this.tribute;
$el.addEventListener("tribute-replaced", function (e) {
e.detail.event.target.dispatchEvent(new Event("input", {
e.target.dispatchEvent(new Event("input", {
bubbles: true
}));
});
+1 -1
View File
@@ -44,7 +44,7 @@ var VueTribute = {
this.tribute.attach($el);
$el.tributeInstance = this.tribute;
$el.addEventListener("tribute-replaced", function (e) {
e.detail.event.target.dispatchEvent(new Event("input", {
e.target.dispatchEvent(new Event("input", {
bubbles: true
}));
});
+1 -1
View File
@@ -1839,7 +1839,7 @@
this.tribute.attach($el);
$el.tributeInstance = this.tribute;
$el.addEventListener("tribute-replaced", function (e) {
e.detail.event.target.dispatchEvent(new Event("input", {
e.target.dispatchEvent(new Event("input", {
bubbles: true
}));
});
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -3
View File
@@ -43,9 +43,7 @@ const VueTribute = {
$el.tributeInstance = this.tribute;
$el.addEventListener("tribute-replaced", e => {
e.detail.event.target.dispatchEvent(
new Event("input", { bubbles: true })
);
e.target.dispatchEvent(new Event("input", { bubbles: true }));
});
},
beforeDestroy() {