charton API / @chart-on/ui / index / FormInputBase
Interface: FormInputBase<V>
Defined in: ui/src/form-model.ts:21
Fields every input has; custom input types extend it.
Extended by
BooleanInputDefColorInputDefMultiSelectInputDefNumberInputDefRangeInputDefSelectInputDefSliderInputDefSourceInputDefTextInputDef
Type Parameters
V
V = unknown
Properties
default?
optionaldefault?:V
Defined in: ui/src/form-model.ts:28
Value when the form opens without one, and after a reset.
disabled?
optionaldisabled?:FormCondition
Defined in: ui/src/form-model.ts:32
Default false. Disabled inputs keep their value and are not validated.
hint?
optionalhint?:string
Defined in: ui/src/form-model.ts:26
Help text under the control.
id
id:
string
Defined in: ui/src/form-model.ts:23
Key of this input's value in FormValues; unique within the schema.
label
label:
string
Defined in: ui/src/form-model.ts:24
visible?
optionalvisible?:FormCondition
Defined in: ui/src/form-model.ts:30
Default true. Hidden inputs keep their value and are not validated.
Methods
validate()?
optionalvalidate(value,values):string|null|undefined
Defined in: ui/src/form-model.ts:34
A message when value is not acceptable, else nothing. Runs after the built-in checks pass.
Parameters
value
V
values
Readonly<FormValues>
Returns
string | null | undefined