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:
@@ -66,6 +66,7 @@ async function onSubmit() {
|
||||
|
||||
defineExpose({
|
||||
async open(r = null) {
|
||||
r = r ? JSON.parse(JSON.stringify(r)) : null; // make a copy
|
||||
busy.value = false;
|
||||
formError.value = {};
|
||||
registry.value = r;
|
||||
|
||||
Reference in New Issue
Block a user