Byte pin type

This commit is contained in:
barsdeveloper
2022-12-29 10:50:41 +01:00
parent 5036866b33
commit 0e7b61d701
14 changed files with 169 additions and 34 deletions

View File

@@ -8,10 +8,8 @@ import INumericInputPinTemplate from "./INumericInputPinTemplate"
export default class IntInputPinTemplate extends INumericInputPinTemplate {
setDefaultValue(values = [], rawValues = values) {
let value = parseInt(values[0])
const integer = this.element.getDefaultValue(true)
if (!(integer instanceof IntegerEntity)) {
throw new TypeError("Expected DefaultValue to be a IntegerEntity")
}
integer.value = values[0]
this.element.requestUpdate("DefaultValue", integer)
}