From b0ae1892f7425a9e07f015c2d45066c2426afac6 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Thu, 12 Feb 2026 15:48:25 -0500 Subject: [PATCH] Add totalPages and currentPage to ref imperative handle --- packages/nuka/src/Carousel/Carousel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nuka/src/Carousel/Carousel.tsx b/packages/nuka/src/Carousel/Carousel.tsx index bd8de810..7bda92a5 100644 --- a/packages/nuka/src/Carousel/Carousel.tsx +++ b/packages/nuka/src/Carousel/Carousel.tsx @@ -121,10 +121,12 @@ export const Carousel = forwardRef( }); // -- forward events to ref - useImperativeHandle(ref, () => ({ goForward, goBack, goToPage }), [ + useImperativeHandle(ref, () => ({ goForward, goBack, goToPage, totalPages, currentPage }), [ goForward, goBack, goToPage, + totalPages, + currentPage ]); // -- autoplay