Closed wartron closed 2 years ago
I'm not able to reproduce this on https://github.com/railsadminteam/rails_admin/commit/8dfc51bb484ba8dde4d63da02dd2bfca3083c49f, any chance you could repro the issue in a fresh Rails app?
The following check should shortcut the delete action when 'Cancel' is clicked: https://github.com/railsadminteam/rails_admin/blob/8dfc51bb484ba8dde4d63da02dd2bfca3083c49f/app/controllers/rails_admin/main_controller.rb#L127-L131
I will try it with a fresh repo. But inspecting the cancel button it does have the name "_continue"
<button class="btn" data-disable-with="Cancel" name="_continue" type="submit">
<i class="fas fa-times"></i>
Cancel
</button>
@wartron Do you use Webpacker? If so, what's the version of rails_admin npm package?
@mshibuya @codealchemy Thank for your help. Upgrading the npm package fixed my issue.
Describe the bug When clicking the 'X' to delete item from the table view. On the confirm page clicking 'Cancel' on the delete confirm page still deletes the row.
Expected behavior Go back to the table view.
Additional context
rails
version: rails (6.1.5)rails_admin
version: 3.0-stable revision: 8dfc51bb484ba8dde4d63da02dd2bfca3083c49f