mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-12 22:47:30 +08:00
Dropdown implementation, switch refactoring
* Various fixes * Fix tests * Dropdown names deduced from pin names * Remove update callbacks * Fix double pins issue * return undefined if not switch
This commit is contained in:
@@ -15,8 +15,6 @@ import Configuration from "../Configuration.js"
|
||||
*/
|
||||
export default class IElement extends LitElement {
|
||||
|
||||
#nextUpdatedCallbacks = []
|
||||
|
||||
/** @type {Blueprint} */
|
||||
#blueprint
|
||||
get blueprint() {
|
||||
@@ -83,11 +81,6 @@ export default class IElement extends LitElement {
|
||||
return this
|
||||
}
|
||||
|
||||
/** @param {PropertyValues} changedProperties */
|
||||
shouldUpdate(changedProperties) {
|
||||
return this.isInitialized && this.isConnected
|
||||
}
|
||||
|
||||
setup() {
|
||||
this.template.setup()
|
||||
this.isSetup = true
|
||||
@@ -125,18 +118,6 @@ export default class IElement extends LitElement {
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties)
|
||||
this.template.updated(changedProperties)
|
||||
// Remember the array might change while iterating
|
||||
for (const f of this.#nextUpdatedCallbacks) {
|
||||
f(changedProperties)
|
||||
}
|
||||
this.#nextUpdatedCallbacks = []
|
||||
}
|
||||
|
||||
addNextUpdatedCallbacks(callback, requestUpdate = false) {
|
||||
this.#nextUpdatedCallbacks.push(callback)
|
||||
if (requestUpdate) {
|
||||
this.requestUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
acknowledgeDelete() {
|
||||
|
||||
Reference in New Issue
Block a user