fix: prevent New rule modal from closing when removing conditions or actions (#991)

This commit is contained in:
dataCenter430
2026-02-15 01:34:34 -07:00
committed by GitHub
parent bd34165426
commit 326b925690
2 changed files with 6 additions and 0 deletions

View File

@@ -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");

View File

@@ -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"]');