diff --git a/lib/component.js b/lib/component.js index d456e06a..8021c10d 100644 --- a/lib/component.js +++ b/lib/component.js @@ -271,13 +271,13 @@ class Component extends WebComponent { this.$panelParent.$panelChildren.add(this); // share either appState or all of state - Object.assign(this.$panelRoot.appState, this.appState); // flush any queued appState changes - this.appState = this.$panelRoot.appState; - this.isStateShared = this.$panelRoot.isStateShared; + // flush any queued appState changes + this.appState = Object.assign(this.$panelRoot.appState, this.appState); // if child element state is shared, point // state to parent's state object and flush any // queued state changes to the parent state + this.isStateShared = this.$panelRoot.isStateShared; if (this.isStateShared) { this.state = Object.assign(this.$panelRoot.state, this.state); }