Skip to content

WhenVisible & infinite scroll not refiring when still visible #2168

Answered by moymat
moymat asked this question in Help (Vue)
Discussion options

You must be logged in to vote

Managed to make it work like this :

<template>
    <div class="flex flex-col items-center justify-center gap-4 py-4">
        <div class="grid grid-cols-1 gap-4 lg:grid-cols-3 2xl:grid-cols-4">
            <Card
                class="max-w-96"
                v-for="item in data"
                :key="item.id"
                :item="item"
            />
            <template v-for="i in skeletonRange" :key="i">
                <Card v-show="loading" class="h-52 animate-pulse bg-gray-300" />
            </template>
        </div>
        <WhenVisible
            always
            v-if="pagination.current_page < pagination.last_page"
            :key="pagination.current_page"
            :…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by moymat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant