Skip to content

Access to isFirstLoad inside v-slot:spinner via scoped-slot #287

Open
@gavrashenko

Description

@gavrashenko

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: #288

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions