Closed paoloricciuti closed 3 months ago
Latest commit: ae3d890d8984a2c06eceae7841c0f950cf447f48
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Link |
---|---|
Latest commit | ae3d890d8984a2c06eceae7841c0f950cf447f48 |
Latest deploy log | https://app.netlify.com/sites/sveltekit-search-params/deploys/66a6215430e8fa0008772357 |
Deploy Preview | https://deploy-preview-89--sveltekit-search-params.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This update enhances the sveltekit-search-params
functionality, ensuring complex values remain unchanged during write operations. It introduces new Svelte components for managing query parameters with TypeScript, improving both type safety and user interaction. Additionally, modifications to core functions prevent unintended mutations of complex objects, bolstering data integrity throughout the application.
Files | Change Summary |
---|---|
.changeset/twelve-weeks-drive.md | Patch for sveltekit-search-params to prevent complex values from being overridden during writes. |
playground/src/routes/default/obj/+page.svelte | New Svelte component for managing the obj query parameter with TypeScript, enhancing user interaction with conditional input field. |
playground/src/routes/default/parameters-obj/+page.svelte | New Svelte component for handling query parameters with dynamic updates based on user input. |
src/lib/sveltekit-search-params.ts | Modifications in queryParameters and queryParam functions to use structuredClone for safer handling of object references. |
tests/index.test.ts | Added tests to verify that default values for complex objects remain unchanged during writes. |
sequenceDiagram
participant User
participant SvelteComponent
participant SearchParams
User->>SvelteComponent: Input data
SvelteComponent->>SearchParams: Update query parameters
SearchParams->>SvelteComponent: Return updated parameters
SvelteComponent->>User: Display updated parameters
Objective | Addressed | Explanation |
---|---|---|
Store is not cleared when navigating to the same route (#[86]) | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closes #86
Summary by CodeRabbit