web/elements: fix model form always loading when viewport check is disabled
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
16f2603130
commit
b0e416e9f0
|
@ -48,10 +48,10 @@ export abstract class ModelForm<T, PKT extends string | number> extends Form<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
if (this._instancePk) {
|
if (this._instancePk && !this._initialLoad) {
|
||||||
if (
|
if (
|
||||||
// if we're in viewport now and haven't loaded AND have a PK set, load now
|
// if we're in viewport now and haven't loaded AND have a PK set, load now
|
||||||
(this.isInViewport && !this._initialLoad) ||
|
this.isInViewport ||
|
||||||
// Or if we don't check for viewport in some cases
|
// Or if we don't check for viewport in some cases
|
||||||
!this.viewportCheck
|
!this.viewportCheck
|
||||||
) {
|
) {
|
||||||
|
|
Reference in New Issue