Skip to content

Commit

Permalink
fix(infinite-scroll): getting xBus from XPlugin instead useXBus compo…
Browse files Browse the repository at this point in the history
…sable
  • Loading branch information
joseacabaneros committed Aug 2, 2024
1 parent 7875ff5 commit c718ad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/x-components/src/directives/infinite-scroll.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Directive } from 'vue';
import { useXBus } from '../composables/use-x-bus';
import { XPlugin } from '../plugins';

const VIEWPORT_ID = 'viewport';

Expand Down Expand Up @@ -82,7 +82,7 @@ export const infiniteScroll: Directive<HTMLElement, { margin: number }> = {
*/
const rootMargin = `1000000% 0px ${margin}px 0px`;
const root = getRoot(element, id);
const xBus = useXBus();
const xBus = XPlugin.bus;

state[id] = new IntersectionObserver(
([entry]) => {
Expand Down

0 comments on commit c718ad1

Please sign in to comment.