"><img> to paste in an image
Hi,route.query.page
will return string value while current-page
prop requires number, to fix this you can just convert your variable to number.
:current-page="Number(currentPage)"
it's still the same, the active current page in pagination is going back to page 1 when I navigate back. I also tried changing the current-page into 2, but the initial active page in pagination is still page 1.
Hi,
Could you please specify which Metronic version are you using?
Do you have any errors/warnings in your browser's console?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
hello, thank you for replying, i'm using the latest metronic in themeforest. I check and there's no error in my browser console.
I also tried putting a number directly in the currentpage props, but the active pagination is still on page 1.
<img src="https://gcdnb.pbrd.co/images/iwKIkafdE4ax.png?o=1">
Hi,
Unfortunately, I was not able to reproduce this issue in the latest version.
Could you please make sure that you are doing everything correctly?
For testing, you can try to set current-page prop to a number value.
:current-page="3"
Could you please attach code of your page_change function?
I tried it just now, and the active pagination is still in page 1
did you mean page_change function?
const page_change = (page: number) => {
currentPage.value = page;
router.push({ query: { page : currentPage.value } });
};
I also tried removing the @page-change, but the initial active pagination is still in page 1
I'm using the default ktdatatable components from demo1 and I didn't change anything on it.
I tested our component with the code which you provided and everything still works fine. I guess the issue might be related to your custom code in the component. Do you change the value of currentPage somewhere in other places?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
I see, I checked the unchange demo1 and it seems no problem, so I guess the problem is from mine, thank you for the help.
You can use watchers to track whenever your currentPage variable value has been changed.
Please don't hesitate to reach out if you need anything more from us.
Regards,
Lauris Stepanovs,
Keenthemes Support Team