mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 06:21:23 +00:00
fix: prevent New rule modal from closing when removing conditions or actions (#991)
This commit is contained in:
@@ -11,6 +11,9 @@ export default class extends Controller {
|
||||
];
|
||||
|
||||
remove(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (e.params.destroy) {
|
||||
this.destroyFieldTarget.value = true;
|
||||
this.element.classList.add("hidden");
|
||||
|
||||
@@ -26,6 +26,9 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
remove(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// Find the parent rules controller before removing the condition
|
||||
const rulesEl = this.element.closest('[data-controller~="rules"]');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user