web: rename Form.reset to resetForm to prevent t.form is not a function error
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
fceab788d2
commit
a36e3aa3a4
|
@ -55,7 +55,7 @@ export class ModalButton extends LitElement {
|
|||
|
||||
resetForms(): void {
|
||||
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
||||
form?.reset();
|
||||
form?.resetForm();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ export class Form<T> extends LitElement {
|
|||
/**
|
||||
* Reset the inner iron-form
|
||||
*/
|
||||
reset(): void {
|
||||
resetForm(): void {
|
||||
const ironForm = this.shadowRoot?.querySelector("iron-form");
|
||||
ironForm?.reset();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export class ModalForm extends ModalButton {
|
|||
return formPromise.then(() => {
|
||||
if (this.closeAfterSuccessfulSubmit) {
|
||||
this.open = false;
|
||||
form?.reset();
|
||||
form?.resetForm();
|
||||
}
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
|
|
|
@ -17,8 +17,8 @@ export class ProxyForm extends Form<unknown> {
|
|||
return (this.shadowRoot?.firstElementChild as Form<unknown>).submit(ev);
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
(this.shadowRoot?.firstElementChild as Form<unknown> | undefined)?.reset();
|
||||
resetForm(): void {
|
||||
(this.shadowRoot?.firstElementChild as Form<unknown> | undefined)?.resetForm();
|
||||
}
|
||||
|
||||
getSuccessMessage(): string {
|
||||
|
|
|
@ -34,7 +34,7 @@ export abstract class TableModal<T> extends Table<T> {
|
|||
|
||||
resetForms(): void {
|
||||
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
||||
form?.reset();
|
||||
form?.resetForm();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue