vue-infinite-loading
vue-infinite-loading copied to clipboard
Access to isFirstLoad inside v-slot:spinner via scoped-slot
It would be nice to have access to isFirstLoad variable inside <template v-slot:spinner>... via scoped-slot. Because sometimes it's normal to show skeleton loader or any other loader as initial loader ( just for the first loading ), and change it to other loader after it, for example:
<InfiniteLoading
@infinite="infinite"
spinner="spiral"
>
<template v-slot:spinner="{ isFirstLoad }">
<SkeletonLoader v-if="isFirstLoad"></SkeletonLoader>
<span v-else>Loading more messages...</span>
</template>
</InfiniteLoading>
Pull request: https://github.com/PeachScript/vue-infinite-loading/pull/288