Skip to content

UseVirtualList but loading data as we scroll #2289

Answered by incutonez
incutonez asked this question in Q&A
Discussion options

You must be logged in to vote

I came up with something that works for my solution... it combines useVirtualList and useScroll (fiddle).

<template>
  <article class="flex flex-1 flex-col overflow-hidden p-2 h-full">
    <div class="mb-4 flex space-x-2">
      Total: <input :value="dataTotal" readonly class="border w-12" /> Loaded:
      <input :value="totalLoaded" readonly class="border w-12" /> Goto:
      <input v-model="goto" @keydown.enter="onEnterGoto" class="border w-12 pl-1" />
      <button @click="onClickRefreshButton" class="border bg-sky-200 hover:bg-sky-300 rounded border-sky-300 px-1">
        Refresh
      </button>
    </div>
    <section v-bind="containerProps" class="h-96">
      <div v-bind="wrapperProps

Replies: 1 comment

Comment options

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