call close from within the modal element
This commit is contained in:
@@ -32,10 +32,8 @@ export class UmbDeleteEntityAction<
|
||||
confirmLabel: 'Delete',
|
||||
});
|
||||
|
||||
const { confirmed } = await modalHandler.onSubmit();
|
||||
if (confirmed) {
|
||||
await this.repository?.delete(this.unique);
|
||||
}
|
||||
await modalHandler.onSubmit();
|
||||
await this.repository?.delete(this.unique);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,10 +32,8 @@ export class UmbTrashEntityAction<
|
||||
confirmLabel: 'Trash',
|
||||
});
|
||||
|
||||
modalHandler?.onSubmit().then(({ confirmed }) => {
|
||||
if (confirmed) {
|
||||
this.repository?.trash([this.unique]);
|
||||
}
|
||||
modalHandler?.onSubmit().then(() => {
|
||||
this.repository?.trash([this.unique]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export class UmbModalLayoutPickerBase<T> extends UmbModalLayoutElement<UmbPicker
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalHandler?.submit();
|
||||
this.modalHandler?.close();
|
||||
}
|
||||
|
||||
protected _handleKeydown(e: KeyboardEvent, key: string) {
|
||||
|
||||
Reference in New Issue
Block a user