web/admin: handle elements in slot=form not being forms
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
9b5e3921cb
commit
04e52d8ba6
|
@ -54,7 +54,9 @@ export class ModalButton extends LitElement {
|
||||||
|
|
||||||
resetForms(): void {
|
resetForms(): void {
|
||||||
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
||||||
form?.resetForm();
|
if ("resetForm" in form) {
|
||||||
|
form?.resetForm();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,9 @@ export abstract class TableModal<T> extends Table<T> {
|
||||||
|
|
||||||
resetForms(): void {
|
resetForms(): void {
|
||||||
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
||||||
form?.resetForm();
|
if ("resetForm" in form) {
|
||||||
|
form?.resetForm();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue