+6
-5
@@ -11,2 +11,3 @@ import {getProp, isSubPath, normalizePath, stringPath} from "../../common.js"; | ||
| let obj = getProp(this, xpath); | ||
| if(obj == null) return; | ||
| let oldValue = obj[x]; | ||
@@ -28,3 +29,3 @@ //TODO: move _props to props mixin | ||
| let len = target.push(...value); | ||
| this.notifyChange({ action: 'splice', path, target, index: target.length - 1, addedCount: value.length, added: value }); | ||
| this.notifyChange({ action: 'splice', path, target, index: target.length - value.length, addedCount: value.length, added: value }); | ||
| return len; | ||
@@ -63,2 +64,5 @@ } | ||
| let name = path[0]; | ||
| this.applyEffects(m); | ||
| // Polymer-like notify for upward binds | ||
| this.dispatchEvent(new CustomEvent(name + '-changed', { detail: m })); | ||
| //TODO: move to prop mixin as effects | ||
@@ -69,7 +73,4 @@ let inst = this.constructor; | ||
| } | ||
| this.applyEffects(m); | ||
| // Polymer-like notify for upward binds | ||
| this.dispatchEvent(new CustomEvent(name + '-changed', { detail: m })); | ||
| } | ||
@@ -76,0 +77,0 @@ forwardNotify(mutation, from, to) { |
+1
-1
| { | ||
| "name": "polylib", | ||
| "description": "A simple library for creating fast, lightweight web components.", | ||
| "version": "1.1.8", | ||
| "version": "1.1.9", | ||
| "license": "MIT", | ||
@@ -6,0 +6,0 @@ "type": "module", |
36566
0.14%931
0.11%