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-idrequired to initialize your control with measmatictypesupported types arenumber(= float),float,integer,textandboolean(default: number)checkedcheckes control whentype="checkbox"valuepresets a value for controls with the type ofnumberortextoptionalcontrol requires no input
Setter/Getter
valuesets/gets value of input-fieldcheckedsets/gets boolean whentype="checkbox"toggle()switch states whentype="checkbox"inputType = :stringsets/gets type of input (number,text,checkbox)resetInputType()resets the property inputType and inputField.type to the value of the correspondingtype-attribute