feat: Add option to disable mousewheel carousel scrolling (#2263)

- Closes: #2220
This commit is contained in:
Dermot Duffy authored and GitHub committed 2025-12-08 17:19:56 -08:00
1 parent f276b8c57d
commit 13bea49429
18 files changed
+69 -7

No files matched your search

@@ -239,6 +239,24 @@ describe('CarouselController', () => {
);
});
it('should not include wheel plugin when wheelScrolling is false', () => {
const children = createTestSlideNodes();
const root = createRoot();
const parent = createParent({ children: children });
new CarouselController(root, parent, { wheelScrolling: false });
// Verify WheelGesturesPlugin is NOT present
expect(EmblaCarousel).toBeCalledWith(
root,
expect.anything(),
expect.not.arrayContaining([
expect.objectContaining({
name: 'wheelGestures',
}),
]),
);
});
it('should recreate carousel when children are added', () => {
const children = createTestSlideNodes();
const root = createRoot();