Open DonKoko opened 1 month ago
hey @rphlmr. I know you used that a lot so I wanted to hear your opinion. Could we maybe use the clientLoader
to prevent this issue from happening when we are storing this data on the client?
Hey 👋
If you want to reuse them in the loader
when you come back to the page it will not work.
We can't modify the request, even before await serverLoader()
.
What about a cookie (not necessary a session cookie, a basic one)? You scope it to the page where it is needed and in the loader you check for searchParams or cookie.
@rphlmr yeah I think we might have to go the cookie way. I like the idea of scoping it based on the path of the assets index so we don't send it with each request but only for that url.
@rajeshj11 is this an issue you might want to work on?
@rphlmr yeah I think we might have to go the cookie way. I like the idea of scoping it based on the path of the assets index so we don't send it with each request but only for that url.
@rajeshj11 is this an issue you might want to work on?
yeah, i would like to give it a try.
@DonKoko please assign it to me. I will also check other approaches and will let you know about them before start the development
Thanks @rajeshj11 . I think the cookie approach is still the best as we can handle it on the server this way. Let me know and lets get started on this.
Contact Details
No response
Is your feature request related to a problem? Please describe?
When I have some filters active on the asset asset and then I navigate to a different page, I want those filters to persist when I come back to the asset index.
Describe the solution you'd like
Store the searchParams in a localStorage, the question is how do we make this smooth. The reason I ask is because localStorage is only accessible on the client, so it will be a very ugly flickr if we trigger the loader and once we get localStorage params it will reload basically.
Describe alternatives you've considered
No response
Additional context
No response