From 31926ddf7f93eaa8f39b4d389b4c31a84c0cb346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Sun, 6 Jun 2021 17:37:52 +0200 Subject: [PATCH] Fix: Render new items if needed on resize --- dist/plex-meets-homeassistant.js | 3 +++ src/plex-meets-homeassistant.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 8586bda..eca9bac 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19812,6 +19812,9 @@ class PlexMeetsHomeAssistant extends HTMLElement { window.addEventListener('scroll', () => { this.renderNewElementsIfNeeded(); }); + window.addEventListener('resize', () => { + this.renderNewElementsIfNeeded(); + }); this.loading = true; this.renderPage(); try { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index cd9e2ce..1057072 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -135,6 +135,9 @@ class PlexMeetsHomeAssistant extends HTMLElement { window.addEventListener('scroll', () => { this.renderNewElementsIfNeeded(); }); + window.addEventListener('resize', () => { + this.renderNewElementsIfNeeded(); + }); this.loading = true; this.renderPage(); try {