Skip to content

Commit 8a8436a

Browse files
committed
call this.updated manually when no setter is defined, closes #14
1 parent 9a9b8e6 commit 8a8436a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sync.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ export const LitSync = (baseElement) => class extends baseElement {
3030
const notifyingEvent = eventName || eventNameForProperty(notifyingProperty);
3131

3232
notifyingElement.addEventListener(notifyingEvent, (e) => {
33+
const oldValue = this[property];
3334
this[property] = e.detail.value;
35+
if (this.__lookupSetter__(property) === undefined) {
36+
this.updated(new Map([[property, oldValue]]));
37+
}
3438
});
3539
}
3640
});

0 commit comments

Comments
 (0)