Show all relevant thumbnails by reseting itemRangeStart based on the current activeIndex to ensure it doesn't continuously increase.
Fix the calculation for the highlighted class by applying the modulus operation with the total number of items, rather than just the currently displayed items (itemsToDisplay).
itemRangeStart
based on the current activeIndex to ensure it doesn't continuously increase.itemsToDisplay
).