vanshaj2023 opened a new issue, #3326:
URL: https://github.com/apache/apisix-dashboard/issues/3326

   ### Issue description
   
   ## Description
   
   When a user edits a plugin configuration in the Plugin Editor Drawer and 
closes 
   it without saving, all changes are silently lost with no warning or 
confirmation 
   dialog. This is a poor UX experience and can lead to accidental data loss.
   
   ## Location
   
   `src/components/form-slice/FormItemPlugins/PluginEditorDrawer.tsx`, line 
49–52
   
   ## Current Behavior
   
   ```tsx
   const handleClose = () => {
     onClose();
     methods.reset(); // silently discards all unsaved edits
   };
   
   
   ### Expected behavior
   
   ## Expected Behavior
   
   If the user has made changes to the plugin config (dirty state), a 
confirmation
   dialog should appear asking:
   
   "You have unsaved changes. Are you sure you want to close?"
   
   If no changes were made, the drawer should close normally without any prompt.
   
   ### How to Reproduce
   
   ## Steps to Reproduce
   
   1. Open the dashboard and navigate to any page that supports plugins (e.g., 
Routes)
   2. Open an existing route and click the edit plugin button on any configured 
plugin
   3. Modify the plugin configuration in the editor
   4. Click the close/X button on the drawer without saving
   5. Reopen the plugin editor — all changes are lost with no warning shown
   
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `etcd --version`):
   - apisix-dashboard version, if have:
   - Browser version, if have:
   
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to