jasleenkaur-qed42 a409271270 fix(create): prevent customizer reset when template query param is set (#11074)
* fix(create): prevent customizer reset when template query param is set

Use shallow nuqs updates and remove racing picker effects so selections
persist on /create?template=start. Sync preset to URL once across hook
instances and add regression tests for preset URL encoding.

Fixes #11060

* fix(create): apply undo/redo via shallow preset update

Undo/redo went through router.replace, which triggers a full server
navigation that resets the preset on prod (#11060). Route it through the
shared shallow search-params update instead, and keep the useSearchParams
reader so the transient values nuqs emits mid-update are not recorded as
phantom history entries.

* fix(create): satisfy typecheck and prettier in search-params test

Add the required `template` field to the first buildPresetUrlUpdate
fixture so it matches DesignSystemSearchParams, and apply prettier
formatting to search-params.ts and its test (both were failing
format:check).

---------

Co-authored-by: shadcn <m@shadcn.com>
2026-07-02 19:43:25 +04:00
2026-04-09 13:49:02 +04:00
2026-06-26 21:19:31 +04:00
2026-06-26 21:19:31 +04:00
2023-04-19 15:01:29 +04:00
2023-01-24 19:51:29 +04:00
2023-01-24 19:51:29 +04:00
2026-06-26 21:19:31 +04:00
2023-10-19 21:12:17 +04:00
2025-01-14 10:50:19 +04:00
fix
2026-03-10 13:25:21 +04:00
2023-01-27 16:02:33 +04:00
2026-06-26 21:19:31 +04:00
2026-02-08 14:45:55 +00:00
2026-06-26 21:19:31 +04:00
2023-01-24 19:51:29 +04:00
2026-06-10 11:10:01 +04:00

shadcn/ui

A set of beautifully designed components that you can customize, extend, and build on. Start here then make it your own. Open Source. Open Code. Use this to build your own component library.

hero

Documentation

Visit https://ui.shadcn.com/docs to view the documentation.

Contributing

Please read the contributing guide.

License

Licensed under the MIT license.

Description
Languages
TypeScript 89.8%
MDX 6.8%
CSS 3.3%