@stencil/vue-output-target
Advanced tools
Comparing version 0.8.7 to 0.8.8
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -94,4 +94,13 @@ // @ts-nocheck | ||
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); | ||
} | ||
}); | ||
@@ -98,0 +107,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54787
996