-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
The to-fn in q-pagination doesn't work in Quasar v2 #9976
Comments
The function generates a route that the Vue Router does not recognizes. Example: |
But :to-fn="page => ({ query: page})" is what the quasar's document recommended, it still doesn't work for me. How should I write the right to-fn function? |
I think that you are missing one important thing. You need to make sure that:
We're not recommending anything. We're showing examples. But obviously you need to sync with the Vue Router routes... |
So should I reconstruct the to-fn to fix the vue-router v4? But I write the to-fn in the old way, I can see nothing geneated for the pagination button throuh the vue-devtools. It worked well in the Quasar v1... |
I have got the same issue. The method related in <q-pagination
v-model:modelValue="page"
:max="5"
:to-fn="getRoute"
/> {
data() { return { page: 1 }},
methods: {
getRoute(page){
console.log('RUN!');
}
}
} |
Hmmm, the handler not running would indeed be a bug. Reopened to investigate. |
@rstoenescu any news? |
Fix will be available in Quasar v2.0.3. |
Describe the bug
The to-fn in q-pagination doesn't work in Quasar v2
Codepen/jsFiddle/Codesandbox (required)
https://codepen.io/theelderprocess/pen/vYmLdoP
Expected behavior
It's expected that the to-fn will generate a link for each paging button, but it doesn't works, nothing generated, both in the CodePen and my developing environment.
Platform (please complete the following information):
Quasar Version: v2
@quasar/app Version: v3
Quasar mode:
Tested on:
OS: Linux or CodePen
The text was updated successfully, but these errors were encountered: