pass a copy when opening dialog

otherwise, any changes the dialog makes will reflect in the calling
view's object
This commit is contained in:
Girish Ramakrishnan
2025-10-08 12:38:19 +02:00
parent ea28c10a39
commit f1fb5f2530
10 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ function onAdd () {
}
function onEdit(domain) {
domainDialog.value.open(domain);
domainDialog.value.open(domain); // pass a copy to prevent the dialog from mutating
}
const inputDialog = useTemplateRef('inputDialog');