mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
* 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
38 lines
906 B
JavaScript
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()
|
|
}
|
|
}
|