-
Notifications
You must be signed in to change notification settings - Fork 603
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue description
On detail/edit pages (Upstreams, Routes, Services, etc.), clicking Cancel silently discards all unsaved form changes with no warning. Users can lose edits without realizing it.
Root cause
The Cancel button calls setReadOnly(true) directly with no unsaved changes check:
<Button variant="outline" onClick={() => setReadOnly(true)}>
{t('form.btn.cancel')}
</Button>Expected behavior
A confirmation dialog should appear when the user has unsaved changes, consistent with the plugin editor drawer which was fixed in #3333 .
How to Reproduce
- Go to Upstreams → open any upstream → click Edit
- Make changes to any field
- Click Cancel
- All changes are silently discarded, no confirmation dialog
Screenshots
No response
Environment
apisix-dashboard: master
Additional context
Affected pages
- Upstreams (
upstreams/detail.$id.tsx) - Routes (
routes/detail.$id.tsx)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working