Input field
Example#
Code-example#
<measmatic-input-field data-id="0" type="text"></measmatic-input-field>
<measmatic-input-field data-id="1" type="text" value="VT-34"></measmatic-input-field>
<measmatic-input-field data-id="2" type="number" optional></measmatic-input-field>
<measmatic-input-field data-id="3" type="number" value="123"></measmatic-input-field>
<measmatic-input-field class="warning" data-id="4" type="number" value="12"></measmatic-input-field>
<measmatic-input-field data-id="5" type="checkbox" checked></measmatic-input-field>
<measmatic-input-field data-id="6" label="float" type="float" value="1.234"></measmatic-input-field>
<measmatic-input-field data-id="7" label="integer" type="integer" value="1"></measmatic-input-field>
Measmatic-input-field#
This custom-element will create a input-field and is used f.e. measmatic-input.
Attributes
data-id
required to initialize your control with measmatictype
supported types arenumber
(= float),float
,integer
,text
andboolean
(default: number)checked
checkes control whentype="checkbox"
value
presets a value for controls with the type ofnumber
ortext
optional
control requires no input
Setter/Getter
value
sets/gets value of input-fieldchecked
sets/gets boolean whentype="checkbox"
toggle()
switch states whentype="checkbox"
inputType = :string
sets/gets type of input (number
,text
,checkbox
)resetInputType()
resets the property inputType and inputField.type to the value of the correspondingtype
-attribute