Files
ueblueprint/js/element/InputElement.js
2022-12-24 15:29:12 +01:00

45 lines
1.1 KiB
JavaScript

import InputTemplate from "../template/pin/InputTemplate"
import Utility from "../Utility"
import IElement from "./IElement"
export default class InputElement extends IElement {
static properties = {
...super.properties,
singleLine: {
type: Boolean,
attribute: "data-single-line",
converter: Utility.booleanConverter,
reflect: true,
},
selectOnFocus: {
type: Boolean,
attribute: "data-select-focus",
converter: Utility.booleanConverter,
reflect: true,
},
blurOnEnter: {
type: Boolean,
attribute: "data-blur-enter",
converter: Utility.booleanConverter,
reflect: true,
},
}
constructor() {
super()
this.singleLine = false
this.selectOnFocus = true
this.blurOnEnter = true
super.initialize({}, new InputTemplate())
}
static newObject() {
return new InputElement()
}
initialize() {
// Initialized in the constructor, this method does nothing
}
}