AdaptTable for Reka UI

Inline cell editing in Reka UI

Mark a column editable, compose editing(onCellEdit), and double-click opens a Reka UI editor in the cell — text, number, date or select. Enter commits, Escape cancels.

The table never mutates your rows. It hands your handler the row, the column key and the new value, and a column's validate refuses a value before it reaches you: clear a name and try to commit it.

With cellNavigation() composed, the arrow keys move a visible focus from cell to cell.

The code

<script setup lang="ts">
import type { ColumnDef } from "@adapttable/vue";
import { DataTable } from "@adapttable/reka-ui";
import { cellNavigation } from "@adapttable/reka-ui/cell-navigation";
import { editing } from "@adapttable/reka-ui/editing";

defineProps<{ rows: readonly Person[] }>();
const emit = defineEmits<{
  save: [row: Person, key: string, value: unknown];
}>();

const columns: ColumnDef<Person>[] = [
  {
    key: "name",
    editable: true,
    editor: "text",
    validate: (value) => (String(value).trim() ? undefined : "Required"),
  },
  { key: "budget", editable: true, editor: "number" },
  {
    key: "status",
    editable: true,
    editor: { type: "select", options: ["Active", "Planned", "Blocked"] },
  },
];
const rowKey = (row: Person) => row.id;
const features = [
  editing<Person>((row, key, value) => emit("save", row, key, value)),
  cellNavigation(),
];
</script>

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

Install

pnpm add @adapttable/reka-ui @adapttable/vue @adapttable/core reka-ui

The same feature in the other kits

More Reka UI features

Reference: cell-editing, cell-navigation. More of this kit: AdaptTable for Reka UI, or the live demo.