@progressive-development/pd-page 0.1.36 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/PdMenu.js +15 -1
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Progressive development page helper, teaser, menu, footer.",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.1.36",
6
+ "version": "0.1.37",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
package/src/PdMenu.js CHANGED
@@ -246,7 +246,7 @@ export class PdMenu extends LitElement {
246
246
 
247
247
  return html`
248
248
  <div class="menu-container">
249
- <slot @click="${PdMenu._scrollToTop}" name="slotLogo"></slot>
249
+ <slot @click="${this._logoClicked}" name="slotLogo"></slot>
250
250
  <ul>
251
251
  ${this._renderItems(this._smallScreen ? [...this.menuItems, ...this.topMenuItems] : this.menuItems, true, this._smallScreen)}
252
252
  </ul>
@@ -348,4 +348,18 @@ export class PdMenu extends LitElement {
348
348
  });
349
349
  }
350
350
  }
351
+
352
+ // eslint-disable-next-line class-methods-use-this
353
+ _logoClicked() {
354
+ PdMenu._scrollToTop();
355
+ this.dispatchEvent(
356
+ new CustomEvent('route-event', {
357
+ detail: {
358
+ route: 'home',
359
+ },
360
+ composed: true,
361
+ bubbles: true,
362
+ })
363
+ );
364
+ }
351
365
  }