Updated super + commets

This commit is contained in:
Yosi Levy 2019-02-16 22:28:46 +02:00
parent ad55bae212
commit fcd06a9000
6 changed files with 14 additions and 8 deletions

View File

@ -10,6 +10,7 @@ export class HaIconNext extends HaIcon {
? "hass:chevron-right"
: "hass:chevron-left";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}

View File

@ -10,6 +10,7 @@ export class HaIconPrev extends HaIcon {
? "hass:chevron-left"
: "hass:chevron-right";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}

View File

@ -10,12 +10,13 @@ const paperIconButtonClass = customElements.get(
export class HaPaperIconButtonArrowNext extends paperIconButtonClass {
public connectedCallback() {
super.connectedCallback();
this.icon =
window.getComputedStyle(this).direction === "ltr"
? "hass:arrow-right"
: "hass:arrow-left";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}

View File

@ -10,12 +10,13 @@ const paperIconButtonClass = customElements.get(
export class HaPaperIconButtonArrowPrev extends paperIconButtonClass {
public connectedCallback() {
super.connectedCallback();
this.icon =
window.getComputedStyle(this).direction === "ltr"
? "hass:arrow-left"
: "hass:arrow-right";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}

View File

@ -10,12 +10,13 @@ const paperIconButtonClass = customElements.get(
export class HaPaperIconButtonNext extends paperIconButtonClass {
public connectedCallback() {
super.connectedCallback();
this.icon =
window.getComputedStyle(this).direction === "ltr"
? "hass:chevron-right"
: "hass:chevron-left";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}

View File

@ -10,12 +10,13 @@ const paperIconButtonClass = customElements.get(
export class HaPaperIconButtonPrev extends paperIconButtonClass {
public connectedCallback() {
super.connectedCallback();
this.icon =
window.getComputedStyle(this).direction === "ltr"
? "hass:chevron-left"
: "hass:chevron-right";
// calling super after setting icon to have it consistently show the icon (otherwise not always shown)
super.connectedCallback();
}
}