Loading for search params
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
I am trying to show a loading skeleton straight away when I click a link with filter params.
I have this directory called
In
The issue I have is i do not see the loading skeleton at all. I only see it on first load of the page.
Is it possible to have a loader when there are search params in a url like I have?
My goal is to have a page with the left side being filters and right side the items. Then when I change the filters, the right side should straight away show its loading until the items arrive back from the endpoint.
I have this directory called
/applications. Now i have a layout.tsx, page.tsx and loading.tsx which is the skeleton loader.In
layout.tsx I have buttons that filter a list of items on the applications page. e.g. /applications?state=open or /applications?state=closedThe issue I have is i do not see the loading skeleton at all. I only see it on first load of the page.
Is it possible to have a loader when there are search params in a url like I have?
My goal is to have a page with the left side being filters and right side the items. Then when I change the filters, the right side should straight away show its loading until the items arrive back from the endpoint.
3 Replies
If the items are already fetched from the server, there will be no loading after that. Your browser will filter from cached result directly
Sun bearOP
Well not all items are fetched, like if i want all items with state = open, i fetch those, then i want state = closed and it should fetch those
Not sure how you handle your fetching so can't say