apache / apache/apisix-dashboard
fix(ux): no confirmation dialog when deleting a plugin from form
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 617
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 1
Description
### Issue description
Clicking the **Delete** button on a plugin card inside a form (Routes, Services, Plugin Configs, etc.) immediately removes the plugin with no confirmation. There is no way to undo this — the user must re-add and re-configure the plugin from scratch.
**Current behavior**
`onDelete?.(name)` is called directly in `onClick` with no guard:
https://github.com/apache/apisix-dashboard/blob/master/src/components/form-slice/FormItemPlugins/PluginCard.tsx#L81
### Expected behavior
A confirmation dialog should appear before deleting, consistent with how top-level resources are deleted (`DeleteResourceBtn` uses `modals.openConfirmModal`).
### How to Reproduce
1. Go to Plugin Configs → Add Plugin Config
2. Add any plugin (e.g. `response-rewrite`) and configure it
3. Click **Delete** on the plugin card
4. Plugin is deleted instantly — no confirmation dialog
### Screenshots
https://github.com/user-attachments/assets/fd77cc89-46cc-42dd-a3d5-61e9e194cc3e
### Environment
- apisix-dashboard: master
### Additional context
_No response_
Contributor guide
Research direction
Start in src/components/form-slice/FormItemPlugins/PluginCard.tsx around the onClick handler at line 81, then compare the confirmation behavior in DeleteResourceBtn and its use of modals.openConfirmModal. The change is complete when deleting a plugin requires confirmation before onDelete is called; review the linked pull request for work already in progress.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100