Compare commits

...

1 Commits

Author SHA1 Message Date
Liam DeBeasi
611f05e8ab install dev build 2024-03-25 09:18:22 -04:00
3 changed files with 19 additions and 10 deletions

14
core/package-lock.json generated
View File

@@ -27,7 +27,7 @@
"@stencil/angular-output-target": "^0.8.4",
"@stencil/react-output-target": "^0.5.3",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "^0.8.7",
"@stencil/vue-output-target": "^0.0.1-dev.11711372539.10de27e3",
"@types/jest": "^29.5.6",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
@@ -1793,9 +1793,9 @@
}
},
"node_modules/@stencil/vue-output-target": {
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.7.tgz",
"integrity": "sha512-hgOzbKKgLdCFrhLpmaw/qQrPSXl6hZ09K+j3p/iWh3esq6sxnwuW1PJKLniwkT4Z/JlDIk6stGPGQYi+WE5I2Q==",
"version": "0.0.1-dev.11711372539.10de27e3",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.0.1-dev.11711372539.10de27e3.tgz",
"integrity": "sha512-TOF8daeP3pztr7mvKOZc9y+MULV3ZFpEtJMO/oVxy7EOxrOV8ZgbfsDMGE9g1UY8YZAhOZCfPUgiL4NcMqYY/Q==",
"dev": true,
"peerDependencies": {
"@stencil/core": ">=2.0.0 || >=3 || >= 4.0.0-beta.0 || >= 4.0.0"
@@ -11248,9 +11248,9 @@
"requires": {}
},
"@stencil/vue-output-target": {
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.7.tgz",
"integrity": "sha512-hgOzbKKgLdCFrhLpmaw/qQrPSXl6hZ09K+j3p/iWh3esq6sxnwuW1PJKLniwkT4Z/JlDIk6stGPGQYi+WE5I2Q==",
"version": "0.0.1-dev.11711372539.10de27e3",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.0.1-dev.11711372539.10de27e3.tgz",
"integrity": "sha512-TOF8daeP3pztr7mvKOZc9y+MULV3ZFpEtJMO/oVxy7EOxrOV8ZgbfsDMGE9g1UY8YZAhOZCfPUgiL4NcMqYY/Q==",
"dev": true,
"requires": {}
},

View File

@@ -49,7 +49,7 @@
"@stencil/angular-output-target": "^0.8.4",
"@stencil/react-output-target": "^0.5.3",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "^0.8.7",
"@stencil/vue-output-target": "^0.0.1-dev.11711372539.10de27e3",
"@types/jest": "^29.5.6",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",

View File

@@ -91,8 +91,17 @@ export const defineContainer = <Props, VModelType = string | number | boolean>(
const eventsNames = Array.isArray(modelUpdateEvent) ? modelUpdateEvent : [modelUpdateEvent];
eventsNames.forEach((eventName: string) => {
el.addEventListener(eventName.toLowerCase(), (e: Event) => {
modelPropValue = (e?.target as any)[modelProp];
emit(UPDATE_VALUE_EVENT, modelPropValue);
/**
* Only update the v-model binding if the event's target is the element we are
* listening on. For example, Component A could emit ionChange, but it could also
* have a descendant Component B that also emits ionChange. We only want to update
* the v-model for Component A when ionChange originates from that element and not
* when ionChange bubbles up from Component B.
*/
if (e.target.tagName === el.tagName) {
modelPropValue = (e?.target as any)[modelProp];
emit(UPDATE_VALUE_EVENT, modelPropValue);
}
});
});
},