Skip to content
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): improve v-model integration for Vue 3.1.0+ #23420

Merged
merged 2 commits into from
Jun 4, 2021
Merged

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Jun 4, 2021

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Vue 3.1.0 introduced a minor breaking change to improve consistency between Vue 2 and Vue 3. Previously, properties there were unused did not show up as keys in the props object. Starting in Vue 3.1.0, all properties will show up regardless of whether or not they are used. In the Vue Output Targets, we check for the presence of modelValue, the v-model property by checking if the key exists in the props object. This no longer works as it was always there in Vue 3.1.0

More context: vuejs/core#3889

What is the new behavior?

  • In addition to checking for the presence of the v-model key, we also check to see if it is undefined or not.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added package: core @ionic/core package package: vue @ionic/vue package labels Jun 4, 2021
@liamdebeasi liamdebeasi merged commit f008628 into master Jun 4, 2021
@liamdebeasi liamdebeasi deleted the vue-310 branch June 4, 2021 23:25
sakibguy added a commit to sakibguy/ionic-framework that referenced this pull request Jun 6, 2021
fix(vue): improve v-model integration for Vue 3.1.0+ (ionic-team#23420)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant