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]) => {