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

$listeners removed from Vue3 #27

Open
yusrenaltair opened this issue Jan 13, 2022 · 1 comment
Open

$listeners removed from Vue3 #27

yusrenaltair opened this issue Jan 13, 2022 · 1 comment

Comments

@yusrenaltair
Copy link

Thank you for this awesome package.
I'm using Vue3 v3.2.26 with jw-vue-pagination v1.0.3
turns out

created() {
  if (!this.$listeners.changePage) {
    throw 'Missing required event listener: "changePage"';
  }
//...
}

this.$listeners.changePage removed from Vue3; produce error
need to modify this line to run on Vue3
https://v3.vuejs.org/guide/migration/listeners-removed.html

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'changePage')
Thanks in advance

@yusrenaltair
Copy link
Author

created() {
if (!this.$attrs.onChangePage) {
   throw 'Missing required event listener: "changePage"';
}
//...
}

working on me

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

No branches or pull requests

1 participant