Files
ueblueprint/js/element/DropdownElement.js
barsdeveloper 6ce665e91f Simplify layout using grid (#7)
* Various style fix WIP

* Removing pin wrapper WIP

* Restore pin wrapper

* WIP

* Several style fixes

* Fix dropdown resizing

* Minor style adjustment, dorpdown bug fix

* Pins sizing

* Additional tests and style fixes

* More size tests and fixes

* More robust styling

* Small format fix
2023-05-18 19:46:45 +02:00

38 lines
906 B
JavaScript

import DropdownTemplate from "../template/pin/DropdownTemplate.js"
import IElement from "./IElement.js"
/** @extends {IElement<Object, DropdownTemplate>} */
export default class DropdownElement extends IElement {
static properties = {
...super.properties,
options: {
type: Object,
},
selectedOption: {
type: String,
},
}
constructor() {
super()
super.initialize({}, new DropdownTemplate())
this.options = /** @type {[String, String][]} */([])
this.selectedOption = ""
}
/** @param {[String, String][]} options */
static newObject(options) {
const result = new DropdownElement()
return result
}
initialize() {
// Initialized in the constructor, this method does nothing
}
getValue() {
return this.template.getSelectedValue()
}
}