Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Fix tests, revert back to workaround for property changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
peschee committed May 26, 2020
1 parent d123fcc commit 7ec47f4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions components/portal-card/src/PortalCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,22 @@ export class PortalCard extends LitElement {
this.backSide = false;
}

requestUpdate(name, oldValue) {
/**
* Workaround for listening on property changes…
*
* @see https://github.com/Polymer/lit-element/issues/643
*
* @param name
* @param oldValue
* @private
*/
_requestUpdate(name, oldValue) {
// @ts-ignore
super._requestUpdate(name, oldValue);

if (name === 'backSide') {
this.dispatchEvent(new Event('side-changed'));
}

return super.requestUpdate(name, oldValue);
}

toggle() {
Expand Down

0 comments on commit 7ec47f4

Please sign in to comment.