Huge refactoring (WIP)
This commit is contained in:
parent
62c4f0a928
commit
895aa132ec
55 changed files with 1177 additions and 2190 deletions
|
@ -49,6 +49,9 @@ export default class ValidatedTextField {
|
|||
ValidatedTextField.tp(
|
||||
"string",
|
||||
"A basic string"),
|
||||
ValidatedTextField.tp(
|
||||
"text",
|
||||
"A string, but allows input of longer strings more comfortably (a text area)"),
|
||||
ValidatedTextField.tp(
|
||||
"date",
|
||||
"A date",
|
||||
|
@ -171,6 +174,9 @@ export default class ValidatedTextField {
|
|||
return new DropDown<string>("", values)
|
||||
}
|
||||
|
||||
/**
|
||||
* {string (typename) --> TextFieldDef}
|
||||
*/
|
||||
public static AllTypes = ValidatedTextField.allTypesDict();
|
||||
|
||||
public static InputForType(type: string, options?: {
|
||||
|
@ -186,6 +192,7 @@ export default class ValidatedTextField {
|
|||
const tp: TextFieldDef = ValidatedTextField.AllTypes[type]
|
||||
const isValidTp = tp.isValid;
|
||||
let isValid;
|
||||
options.textArea = options.textArea ?? type === "text";
|
||||
if (options.isValid) {
|
||||
const optValid = options.isValid;
|
||||
isValid = (str, country) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue