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

Vue: Work out why extends syntax doesn't work in Navigator #2877

Closed
emccorson opened this issue Mar 23, 2021 · 2 comments · Fixed by #3001
Closed

Vue: Work out why extends syntax doesn't work in Navigator #2877

emccorson opened this issue Mar 23, 2021 · 2 comments · Fixed by #3001

Comments

@emccorson
Copy link
Contributor

emccorson commented Mar 23, 2021

In the Navigator example in vue-onsenui-examples, we push a page with the following syntax:

this.$emit('push', {
  extends: page2,
  onsNavigatorProps: {
    myProp: 'This is a navigator prop'
  }
});

For some reason, the extends doesn't work with ref in VOnsNavigator, and it causes VOnsNavigator's ref to the page to be a comment instead of the page component itself.

It also gives the following warning:

[Vue warn]: Component is missing template or render function. 
  at <Anonymous key=undefined onShow=fn onPush=fn  ... > 
  at <VOnsNavigator swipeable="" page-stack= 
Array [ {…}, {…} ]
 options= 
Object { animation: "slide" }
  ... > 
  at <VOnsPage> 
  at <App>

Figure out what's going on, and if the extends syntax can no longer be used, document it.

@emccorson emccorson added this to the Vue 3 upgrade milestone Mar 23, 2021
@emccorson
Copy link
Contributor Author

emccorson commented Mar 24, 2021

@emccorson emccorson changed the title Vue: Work out why extends syntax doesn't work in Navigator but object spread syntax does Vue: Work out why extends syntax doesn't work in Navigator Mar 24, 2021
@emccorson
Copy link
Contributor Author

See also vuejs/core#6249.

emccorson added a commit to OnsenUI/onsen.io that referenced this issue Jul 11, 2022
Still need to add FAQ entry about using VOnsNavigator with extends. This
will be done when we have a solution to OnsenUI/OnsenUI#2877.
emccorson added a commit to OnsenUI/onsen.io that referenced this issue Jul 11, 2022
Still need to add FAQ entry about using VOnsNavigator with extends. This
will be done when we have a solution to OnsenUI/OnsenUI#2877.
emccorson added a commit that referenced this issue Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant