Fix: Horizontal mode not working if count not specified

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

@ -22384,11 +22384,10 @@ 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);
}
itemsPerRow = maxRenderedItems;
if (this.maxRows) {
itemsPerRow = Math.ceil(maxRenderedItems / this.maxRows);
}
// eslint-disable-next-line consistent-return
const searchValues = lodash.split(this.searchValue, ' ');

@ -614,11 +614,10 @@ 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);
}
itemsPerRow = maxRenderedItems;
if (this.maxRows) {
itemsPerRow = Math.ceil(maxRenderedItems / this.maxRows);
}
// eslint-disable-next-line consistent-return
const searchValues = _.split(this.searchValue, ' ');

Loading…
Cancel
Save