web/elements: add ProxyForm to instantiate forms based on string type
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -162,11 +162,7 @@ export class Form<T> extends LitElement {
|
||||
</div>`;
|
||||
}
|
||||
|
||||
render(): TemplateResult {
|
||||
const rect = this.getBoundingClientRect();
|
||||
if (rect.x + rect.y + rect.width + rect.height === 0) {
|
||||
return html``;
|
||||
}
|
||||
renderVisible(): TemplateResult {
|
||||
return html`<iron-form
|
||||
@iron-form-presubmit=${(ev: Event) => { this.submit(ev); }}>
|
||||
${this.renderNonFieldErrors()}
|
||||
@ -174,4 +170,12 @@ export class Form<T> extends LitElement {
|
||||
</iron-form>`;
|
||||
}
|
||||
|
||||
render(): TemplateResult {
|
||||
const rect = this.getBoundingClientRect();
|
||||
if (rect.x + rect.y + rect.width + rect.height === 0) {
|
||||
return html``;
|
||||
}
|
||||
return this.renderVisible();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user