Fix: Horizontal mode not working if count not specified

pull/72/head
Juraj Nyíri 3 years ago
parent 34852a3070
commit 1ced6d8db3

@ -22384,12 +22384,11 @@ class PlexMeetsHomeAssistant extends HTMLElement {
let itemsPerRow = this.data[this.config.libraryName].length;
if (this.maxCount) {
maxRenderedItems = this.maxCount;
}
itemsPerRow = maxRenderedItems;
if (this.maxRows) {
itemsPerRow = Math.ceil(maxRenderedItems / this.maxRows);
}
console.log(itemsPerRow);
}
// eslint-disable-next-line consistent-return
const searchValues = lodash.split(this.searchValue, ' ');
// eslint-disable-next-line consistent-return

@ -614,12 +614,11 @@ class PlexMeetsHomeAssistant extends HTMLElement {
let itemsPerRow = this.data[this.config.libraryName].length;
if (this.maxCount) {
maxRenderedItems = this.maxCount;
}
itemsPerRow = maxRenderedItems;
if (this.maxRows) {
itemsPerRow = Math.ceil(maxRenderedItems / this.maxRows);
}
console.log(itemsPerRow);
}
// eslint-disable-next-line consistent-return
const searchValues = _.split(this.searchValue, ' ');
// eslint-disable-next-line consistent-return

Loading…
Cancel
Save