From c77f804b7775e8ff9ff4b94ab7d37e34036a6614 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 22 Dec 2021 20:13:52 +0100 Subject: [PATCH] web/user: fix user details not rendering when loading to a different user settings tab and then switching closes #1664 Signed-off-by: Jens Langhammer --- web/src/elements/forms/Form.ts | 4 +++- web/src/elements/forms/ModelForm.ts | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/elements/forms/Form.ts b/web/src/elements/forms/Form.ts index 5623e74f6..fa3914d75 100644 --- a/web/src/elements/forms/Form.ts +++ b/web/src/elements/forms/Form.ts @@ -30,6 +30,8 @@ export class APIError extends Error { @customElement("ak-form") export class Form extends LitElement { + viewportCheck = true; + @property() successMessage = ""; @@ -274,7 +276,7 @@ export class Form extends LitElement { } render(): TemplateResult { - if (!this.isInViewport) { + if (this.viewportCheck && !this.isInViewport) { return html``; } return this.renderVisible(); diff --git a/web/src/elements/forms/ModelForm.ts b/web/src/elements/forms/ModelForm.ts index e9235ccfe..bb6cc591e 100644 --- a/web/src/elements/forms/ModelForm.ts +++ b/web/src/elements/forms/ModelForm.ts @@ -5,8 +5,6 @@ import { EVENT_REFRESH } from "../../constants"; import { Form } from "./Form"; export abstract class ModelForm extends Form { - viewportCheck = true; - abstract loadInstance(pk: PKT): Promise; @property({ attribute: false })