File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
website/src/content/v8/sandboxes/React/SandboxFilesSrc Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,15 @@ export const useGroupIndicator = (
1010
1111 const createGroupIndicatorClassNames = useCallback (
1212 ( emblaApi : EmblaCarouselType ) => {
13- const { scrollSnapList } = emblaApi . internalEngine ( )
14- const { slidesBySnap, snapBySlide } = scrollSnapList
13+ const { slideRegistry } = emblaApi . internalEngine ( )
1514
1615 const groupIndicatorClassNames = emblaApi
1716 . slideNodes ( )
1817 . map ( ( _ , slideIndex ) => {
19- const snapIndex = snapBySlide [ slideIndex ]
20- const slidesInGroup = slidesBySnap [ snapIndex ]
18+ const snapIndex = slideRegistry . findIndex ( ( group ) =>
19+ group . includes ( slideIndex )
20+ )
21+ const slidesInGroup = slideRegistry [ snapIndex ]
2122 if ( ! slidesInGroup ) return ''
2223
2324 const firstIndex = slidesInGroup [ 0 ]
You can’t perform that action at this time.
0 commit comments