Fix issue causing first thumbnail to be empty.

This commit is contained in:
Dermot Duffy
2022-04-02 14:28:18 -07:00
parent 5b66c6cad6
commit f98d749d07
4 changed files with 27 additions and 21 deletions
+2
View File
@@ -102,6 +102,7 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
return {
containScroll: 'keepSnaps',
dragFree: true,
startIndex: this._selected ?? 0,
};
}
@@ -138,6 +139,7 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
this.updateComplete.then(() => {
if (this._carousel) {
if (this._selected !== undefined && this._selected !== null) {
console.info('thumbnail carousel scroll to')
this.carouselScrollTo(this._selected);
}
}