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 {
|
resetForms(): void {
|
||||||
this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
|
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 the inner iron-form
|
||||||
*/
|
*/
|
||||||
reset(): void {
|
resetForm(): void {
|
||||||
const ironForm = this.shadowRoot?.querySelector("iron-form");
|
const ironForm = this.shadowRoot?.querySelector("iron-form");
|
||||||
ironForm?.reset();
|
ironForm?.reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class ModalForm extends ModalButton {
|
||||||
return formPromise.then(() => {
|
return formPromise.then(() => {
|
||||||
if (this.closeAfterSuccessfulSubmit) {
|
if (this.closeAfterSuccessfulSubmit) {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
form?.reset();
|
form?.resetForm();
|
||||||
}
|
}
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new CustomEvent(EVENT_REFRESH, {
|
new CustomEvent(EVENT_REFRESH, {
|
||||||
|
|
|
@ -17,8 +17,8 @@ export class ProxyForm extends Form<unknown> {
|
||||||
return (this.shadowRoot?.firstElementChild as Form<unknown>).submit(ev);
|
return (this.shadowRoot?.firstElementChild as Form<unknown>).submit(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
reset(): void {
|
resetForm(): void {
|
||||||
(this.shadowRoot?.firstElementChild as Form<unknown> | undefined)?.reset();
|
(this.shadowRoot?.firstElementChild as Form<unknown> | undefined)?.resetForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
getSuccessMessage(): string {
|
getSuccessMessage(): string {
|
||||||
|
|
|
@ -34,7 +34,7 @@ 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?.reset();
|
form?.resetForm();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue