From 120b56c81dc86bf9a5b4b58f6a06f4498336e5a8 Mon Sep 17 00:00:00 2001 From: harshdeep-gill Date: Fri, 23 May 2025 16:48:19 +0530 Subject: [PATCH] WP-205 Fix tp-slider-count perView issue --- src/slider/tp-slider-count.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slider/tp-slider-count.ts b/src/slider/tp-slider-count.ts index 487a640..9c13b17 100644 --- a/src/slider/tp-slider-count.ts +++ b/src/slider/tp-slider-count.ts @@ -58,8 +58,8 @@ export class TPSliderCountElement extends HTMLElement { return; } - // Initializing current variable including step. Along with initializing total variable. - const current: number = Math.min( slider.currentSlideIndex - 1 + slider.step, slider.getTotalSlides() ); + // Initializing current variable including per view. Along with initializing total variable. + const current: number = Math.min( slider.currentSlideIndex - 1 + slider.perView, slider.getTotalSlides() ); const total: string = slider.getAttribute( 'total' ) ?? ''; // Updating variables in format attribute.