mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-14 07:47:29 +08:00
Make template stateful
This commit is contained in:
@@ -64,42 +64,42 @@ export default class IElement extends LitElement {
|
||||
connectedCallback() {
|
||||
super.connectedCallback()
|
||||
this.blueprint = this.closest("ueb-blueprint")
|
||||
this.template.connectedCallback(this)
|
||||
this.template.connectedCallback()
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
willUpdate(changedProperties) {
|
||||
super.willUpdate(changedProperties)
|
||||
this.template.willUpdate(this, changedProperties)
|
||||
this.template.willUpdate(changedProperties)
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
update(changedProperties) {
|
||||
super.update(changedProperties)
|
||||
this.template.update(this, changedProperties)
|
||||
this.template.update(changedProperties)
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.template.render(this)
|
||||
return this.template.render()
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
this.template.firstUpdated(this, changedProperties)
|
||||
this.template.inputSetup(this)
|
||||
this.template.firstUpdated(changedProperties)
|
||||
this.template.inputSetup()
|
||||
}
|
||||
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties)
|
||||
this.template.updated(this, changedProperties)
|
||||
this.template.updated(changedProperties)
|
||||
this.#nextUpdatedCallbacks.forEach(f => f(changedProperties))
|
||||
this.#nextUpdatedCallbacks = []
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback()
|
||||
this.template.cleanup(this)
|
||||
this.template.cleanup()
|
||||
}
|
||||
|
||||
addNextUpdatedCallbacks(callback, requestUpdate = false) {
|
||||
|
||||
@@ -136,10 +136,6 @@ export default class PinElement extends IElement {
|
||||
})
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback()
|
||||
}
|
||||
|
||||
/** @return {GuidEntity} */
|
||||
GetPinId() {
|
||||
return this.entity.PinId
|
||||
|
||||
Reference in New Issue
Block a user