npm.io
3.0.0-alpha.1 • Published 4d ago

@vueye-table/core

Licence
MIT
Version
3.0.0-alpha.1
Deps
0
Size
166 kB
Vulns
0
Weekly
0
Stars
111

@vueye-table/core

The framework-independent engine behind vueye-table: typed column definitions, searching, filtering, stable multi-column sorting, pagination, selection, column visibility and order, editing with undo, spreadsheet addressing, clipboard text, and CSV export. No DOM, no Node.js, no framework.

pnpm add @vueye-table/core
import { createTable } from "@vueye-table/core";

const table = createTable({
  data: users,
  columns: [
    { id: "name.first", header: "First name" },
    { id: "age", align: "end" },
  ],
  initialState: { pagination: { page: 1, pageSize: 20 } },
  onStateChange: (state) => console.log(state.sorting),
});

table.search("ada");
table.toggleSort("age");
const { rows, pageCount, issues } = table.getSnapshot();

See the repository README for every layer.

Keywords