PUI-33 fix(composables): guard record changes inside the same component #108
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/PUI-33-useunsavedchanges-misses-record-changes-inside-the"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
useUnsavedChanges registered only onBeforeRouteLeave, so moving from /blog/1/edit to /blog/2/edit dropped a dirty draft without asking. It now also registers onBeforeRouteUpdate; an optional sameRecord(to, from) predicate (default: equal route params) keeps query and hash changes silent. Test: packages/ui/tests/unsaved-changes.test.ts.
Checks: bun test, typecheck, lint, format:check, build:vue.
Refs: PUI-33