Comments (2)
maybe this is a separate feature request, but I think it would be really cool to not include default values in the URL at all. not upon initial page load, but also if they for some reason were set to their default value again in follow up page interactions.
the use case for this is a complex data table where there are lots of potential search params such as search filter params (q=
), pagination params (page=
,pageSize=
), what columns to show (columns=
)...
in those cases, it can be nice to show a clean URL if no filters actually have been applied. then that URL is easier to share. but if you for some reason have selected for example page 2 but then navigated to page 1 (which is the default), it would be nice if page 1 was pruned from the URL again so it is again easy to share
from sveltekit-search-params.
I'm a bit thorned about this, I want to think about the consequences of this. For example if you are reading from the load function without using the library it might be confusing. One of my ideas was to always reflect the url but I can see where having a default might help. I have to think about it
from sveltekit-search-params.
Related Issues (20)
- Usage in derived storage HOT 5
- [Bug]: Updating queryParam(s) values to undefined does not remove param
- Allow encoding as undefined to remove param HOT 2
- Setting a default if enumerated parameter is invalid HOT 2
- defaultValue not applyed in a second client side navigation HOT 3
- Question: How do you achieve goto with replaceState HOT 1
- Array helper default value not typed correctly HOT 1
- Optimistic store updates, update store before navigation happens. HOT 1
- Cannot find package '$app' HOT 1
- first unsubscribe to params store stops updates with multiple subscribers HOT 2
- sort params in url to improve browser cache hit rate
- update SvelteKit `peerDependency` to include 2 HOT 1
- Type error with exactOptionalPropertyTypes on
- Updating to SvelteKit 2 leads to warning HOT 8
- Crashes with enabled prerendering HOT 8
- Support for bind:group directive HOT 5
- Reset search param A when search param B changes - Unexpected behaviour HOT 5
- hiding default value with arrays and objects HOT 1
- Value is nullable if default value is provided HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sveltekit-search-params.