Fix: Bug where if searched used and one poster returned it was no longer possible to get more than 1 poster on page

pull/30/head 2.0.11
Juraj Nyíri 4 years ago
parent 1b3d3f8572
commit c29c377c92

@ -21088,10 +21088,12 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.searchInputElem.value = this.searchValue;
this.searchInputElem.placeholder = `Search ${this.config.libraryName}...`;
this.searchInputElem.addEventListener('keyup', () => {
this.searchValue = this.searchInputElem.value;
this.renderPage();
this.focus();
this.renderNewElementsIfNeeded();
if (!lodash.isEqual(this.searchInputElem.value, this.searchValue)) {
this.searchValue = this.searchInputElem.value;
this.renderPage();
this.focus();
this.renderNewElementsIfNeeded();
}
});
searchContainer.appendChild(this.searchInputElem);
return searchContainer;
@ -21182,7 +21184,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
}
}
this.renderedItems = 0;
this.columnsCount = 0;
// this.columnsCount = 0;
const spinner = document.createElement('div');
spinner.style.display = 'flex';
spinner.style.alignItems = 'center';

@ -154,7 +154,6 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.renderedItems > 0
) {
this.maxRenderCount = this.renderedItems + this.columnsCount * (loadAdditionalRowsCount * 2);
this.renderMovieElems();
this.calculatePositions();
}
@ -452,10 +451,12 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.searchInputElem.placeholder = `Search ${this.config.libraryName}...`;
this.searchInputElem.addEventListener('keyup', () => {
this.searchValue = this.searchInputElem.value;
this.renderPage();
this.focus();
this.renderNewElementsIfNeeded();
if (!_.isEqual(this.searchInputElem.value, this.searchValue)) {
this.searchValue = this.searchInputElem.value;
this.renderPage();
this.focus();
this.renderNewElementsIfNeeded();
}
});
searchContainer.appendChild(this.searchInputElem);
@ -557,7 +558,8 @@ class PlexMeetsHomeAssistant extends HTMLElement {
}
this.renderedItems = 0;
this.columnsCount = 0;
// this.columnsCount = 0;
const spinner = document.createElement('div');
spinner.style.display = 'flex';
spinner.style.alignItems = 'center';

Loading…
Cancel
Save