Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ToxifiedM's avatar

How to store state while paginating through results - Laravel Inertia Vue

Is it possible to store the state of the select all checkbox or individual row checkbox while paginating through the results? As the props are passed on to the frontend through Inertia my paginator is requesting the pagination data and urls of the pages to paginate, from my props and then through Inertia link, navigating between the urls, it just seems to be like an spa, but it never stores the state of the rows selected or the select all checkbox. How can we overcome that?

select state

0 likes
5 replies
300code's avatar

@frankielee no sir, remeembering state is only if page refresh not on spot navigation inertia. you can use this <Link :href="link.url" preserve-state />

ikta.web's avatar

Add the "preserve-state" to your Link. Something like this:

<Link :href="link.url" preserve-state />
2 likes
300code's avatar

@ikta.web this right to use to preserve state on page that correct way on inertia

300code's avatar

@toxifiedm if you need state between pages that forget it in inertia, but u can use maually in inertia render in controller each page possible, take care it!

Please or to participate in this conversation.