web/admin: fix ModelForm not re-loading after being reset

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-07-02 21:21:11 +02:00
parent 9df16a9ae0
commit dd53e7e9b1
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,11 @@ export abstract class ModelForm<T, PKT extends string | number> extends Form<T>
}); });
} }
resetForm(): void {
super.resetForm();
this._initialLoad = false;
}
render(): TemplateResult { render(): TemplateResult {
// 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
if (this.isInViewport && !this._initialLoad && this._instancePk) { if (this.isInViewport && !this._initialLoad && this._instancePk) {