Add option to show text field inline with the rendering; add option to fill out a default value

This commit is contained in:
Pieter Vander Vennet 2021-07-11 15:44:17 +02:00
parent 29ea0ac925
commit 6e3c39e475
10 changed files with 123 additions and 23 deletions

View file

@ -36,11 +36,11 @@ export class TextField extends InputElement<string> {
this.SetClass("form-text-field")
let inputEl: HTMLElement
if (options.htmlType === "area") {
this.SetClass("w-full box-border max-w-full")
const el = document.createElement("textarea")
el.placeholder = placeholder
el.rows = options.textAreaRows
el.cols = 50
el.style.cssText = "max-width: 100%; width: 100%; box-sizing: border-box"
inputEl = el;
} else {
const el = document.createElement("input")