AdaptTable for Quasar

Row and column virtualization in Quasar

Compose virtualize() and the table renders the rows in view plus a small overscan, whatever the dataset's size — forty thousand rows on this page, a few dozen of them in the page at once.

The scroll box scrolls rather than the page, and sorting and filtering keep working on the whole dataset rather than on what is drawn. virtualize({ virtualizeColumns: true }) does the same across, for column sets wider than the box.

The code

<script setup lang="ts">
import type { ColumnDef } from "@adapttable/vue";
import { DataTable } from "@adapttable/quasar";
import { virtualize } from "@adapttable/quasar/virtualize";

defineProps<{ rows: readonly Person[] }>();

const columns: ColumnDef<Person>[] = [
  { key: "name", sortable: true },
  { key: "team" },
  { key: "budget", sortable: true },
];
const rowKey = (row: Person) => row.id;
const features = [virtualize({ maxHeight: 480 })];
</script>

<template>
  <DataTable
    :data="rows"
    :columns="columns"
    :row-key="rowKey"
    pagination-mode="infinite"
    :features="features"
  />
</template>

Install

pnpm add @adapttable/quasar @adapttable/vue @adapttable/core quasar@2.34.0

The same feature in the other kits

More Quasar features

Reference: virtualization. More of this kit: AdaptTable for Quasar, or the live demo.