An idea for a "kit for Kit" #114
frederikhors
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since your project is AMAZING, I was wondering what do you think about creating a "kit for Kit" with Svelte 5 that allows us to save in the page URL any POJO object or scalar type we need with the serializer we need (for example I can use
JSON.stringify()
andJSON.parse()
for now).I described something similar here.
This would be amazing for lists filters for example:
I have a players list on page
/players
I order the list by created_at DESC
the kit saves this filter in the URL:
/players?order_by=created_at_DESC
(just an example)I filter players form team_id: 123
the kit saves this new filter in the URL:
/players?order_by=created_at_DESC&team_id=123
(just an example)I go back with the browser and the URL is now again:
/players?order_by=created_at_DESC
(just an example)I reload the page now and since the URL is this the list is ordered like before the reload
I hope you get the idea.
I now can manually add this using in each place I need it
url.searchParams.set
andafterNavigate
but I would like to have an helper to be used everywhere.Again, thanks for your work!
Beta Was this translation helpful? Give feedback.
All reactions