From c718ad10b2e6d5b6e6735c47fa14598f7ef64233 Mon Sep 17 00:00:00 2001 From: "Jose A. Cabaneros" Date: Fri, 2 Aug 2024 14:24:14 +0200 Subject: [PATCH] fix(infinite-scroll): getting xBus from XPlugin instead useXBus composable --- packages/x-components/src/directives/infinite-scroll.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-components/src/directives/infinite-scroll.ts b/packages/x-components/src/directives/infinite-scroll.ts index 1fcf949c3f..88afcb3e1d 100644 --- a/packages/x-components/src/directives/infinite-scroll.ts +++ b/packages/x-components/src/directives/infinite-scroll.ts @@ -1,5 +1,5 @@ import { Directive } from 'vue'; -import { useXBus } from '../composables/use-x-bus'; +import { XPlugin } from '../plugins'; const VIEWPORT_ID = 'viewport'; @@ -82,7 +82,7 @@ export const infiniteScroll: Directive = { */ const rootMargin = `1000000% 0px ${margin}px 0px`; const root = getRoot(element, id); - const xBus = useXBus(); + const xBus = XPlugin.bus; state[id] = new IntersectionObserver( ([entry]) => {