-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vue): v-model does not update when other events bubble up #425
Conversation
* 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it guaranteed that at least one of these two values can never be undefined
/null
? My only thought here is running into a case where we end up doing:
if (undefined === undefined) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Element.tagName
is always defined.
If e.target
is defined then it should be an Element
(which means tagName
is defined). However, EventTarget
can potentially be null
. My understanding is that target
can be null when an event is created but not dispatched on an element. You can test this by logging new CustomEvent('foo')
. In this case, the event is dispatched on an element, so target
should be non-null.
…29243) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@stencil/vue-output-target](https://stenciljs.com/) ([source](https://togithub.com/ionic-team/stencil-ds-output-targets)) | [`0.8.7` -> `0.8.8`](https://renovatebot.com/diffs/npm/@stencil%2fvue-output-target/0.8.7/0.8.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fvue-output-target/0.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fvue-output-target/0.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fvue-output-target/0.8.7/0.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fvue-output-target/0.8.7/0.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>ionic-team/stencil-ds-output-targets (@​stencil/vue-output-target)</summary> ### [`v0.8.8`](https://togithub.com/ionic-team/stencil-ds-output-targets/releases/tag/%40stencil/vue-output-target%400.8.8) [Compare Source](https://togithub.com/ionic-team/stencil-ds-output-targets/compare/a3588e905186a0e86e7f88418fd5b2f9531b55e0...@stencil/vue-output-target@0.8.8) #### What's Changed - fix(vue): v-model does not update when other events bubble up by [@​liamdebeasi](https://togithub.com/liamdebeasi) in [https://github.com/ionic-team/stencil-ds-output-targets/pull/425](https://togithub.com/ionic-team/stencil-ds-output-targets/pull/425) **Full Changelog**: https://github.com/ionic-team/stencil-ds-output-targets/compare/[@​stencil/angular-output-target](https://togithub.com/stencil/angular-output-target)[@​0](https://togithub.com/0).8.4...[@​stencil/vue-output-target](https://togithub.com/stencil/vue-output-target)[@​0](https://togithub.com/0).8.8 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ionic-team/ionic-framework). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally for affected output targetsnpm test
) were run locally and passednpm run prettier
) was run locally and passedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue URL: resolves #424
What is the new behavior?
Does this introduce a breaking change?
Other information
Dev build:
0.0.1-dev.11711372539.10de27e3
Verified this issue is fixed using an Ionic Framework build in the sample app from the linked issue.