Input typing and condition

This commit is contained in:
barsdeveloper
2022-11-11 21:51:53 +01:00
parent 48065a4777
commit c3743572fc
15 changed files with 90 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
import { html, nothing } from "lit"
import INumericPinTemplate from "./INumericPinTemplate"
/** @typedef {import("../entity/IntegerEntity").default} IntEntity */
/** @extends INumericPinTemplate<IntEntity> */
export default class IntPinTemplate extends INumericPinTemplate {
setDefaultValue(values = [], rawValues = values) {
this.element.setDefaultValue(values[0])
}
renderInput() {
if (this.element.isInput() && !this.element.isLinked) {
return html`
<div class="ueb-pin-input">
<ueb-input .singleLine="${true}" .innerText="${this.element.entity.DefaultValue.toString()}">
</ueb-input>
</div>
`
}
return nothing
}
}