From dd53e7e9b137f514595b02f3ef5a2bc9505abfd0 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 2 Jul 2021 21:21:11 +0200 Subject: [PATCH] web/admin: fix ModelForm not re-loading after being reset Signed-off-by: Jens Langhammer --- web/src/elements/forms/ModelForm.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/elements/forms/ModelForm.ts b/web/src/elements/forms/ModelForm.ts index bc272990d..a93750d75 100644 --- a/web/src/elements/forms/ModelForm.ts +++ b/web/src/elements/forms/ModelForm.ts @@ -37,6 +37,11 @@ export abstract class ModelForm extends Form }); } + resetForm(): void { + super.resetForm(); + this._initialLoad = false; + } + render(): TemplateResult { // if we're in viewport now and haven't loaded AND have a PK set, load now if (this.isInViewport && !this._initialLoad && this._instancePk) {