Fix delete confirmation backdrop state
This commit is contained in:
1 parent
c1cb272702
commit
d1129175bc
1 file changed
+6
-4
@@ -28,6 +28,7 @@
|
||||
};
|
||||
|
||||
const resetDeleteConfirmation = (card) => {
|
||||
const stage = card?.closest('.sg-delete-confirmation-pattern__stage');
|
||||
const confirmation = card?.querySelector('[data-shared-editable-card-delete-confirmation]');
|
||||
const input = card?.querySelector('[data-shared-editable-card-delete-input]');
|
||||
const submit = card?.querySelector('[data-shared-editable-card-delete-submit]');
|
||||
@@ -43,12 +44,13 @@
|
||||
if (confirmation) {
|
||||
confirmation.hidden = true;
|
||||
}
|
||||
if (card) {
|
||||
card.dataset.dialogOpen = 'false';
|
||||
if (stage) {
|
||||
stage.dataset.dialogOpen = 'false';
|
||||
}
|
||||
};
|
||||
|
||||
const openDeleteConfirmation = (card) => {
|
||||
const stage = card?.closest('.sg-delete-confirmation-pattern__stage');
|
||||
const confirmation = card?.querySelector('[data-shared-editable-card-delete-confirmation]');
|
||||
const input = card?.querySelector('[data-shared-editable-card-delete-input]');
|
||||
|
||||
@@ -59,8 +61,8 @@
|
||||
if (confirmation) {
|
||||
confirmation.hidden = false;
|
||||
}
|
||||
if (card) {
|
||||
card.dataset.dialogOpen = 'true';
|
||||
if (stage) {
|
||||
stage.dataset.dialogOpen = 'true';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user