examples: unsaved-changes guard on forms #51

Closed
opened 2026-09-14 21:55:06 +00:00 by pienter · 0 comments
Owner

Deferred from the UX/a11y sweep.

No form in the playground guards against leaving with unsaved changes: no onBeforeRouteLeave, beforeunload or dirty tracking in examples/vue/src or in Form/RecordForm. Cancel and sidebar links discard edits silently on every form.

Proposal: one useUnsavedChanges(model, snapshot) composable in the example (route guard + beforeunload), confirming through the library AlertDialog. Decide first whether dirty tracking belongs in RecordForm itself.

Deferred from the UX/a11y sweep. No form in the playground guards against leaving with unsaved changes: no `onBeforeRouteLeave`, `beforeunload` or dirty tracking in `examples/vue/src` or in `Form`/`RecordForm`. Cancel and sidebar links discard edits silently on every form. Proposal: one `useUnsavedChanges(model, snapshot)` composable in the example (route guard + `beforeunload`), confirming through the library `AlertDialog`. Decide first whether dirty tracking belongs in `RecordForm` itself.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pienter/ui#51
No description provided.