AdaptTable for Nuxt UI

Right-to-left Nuxt UI data table

Arabic labels and cell values mirror the table, its pager and the filter popover. Pinning uses logical edges, so start is the right edge.

Pass getLabels("ar") to labels and getDirection("ar") to dir. Every table, including nested tables, receives the same presentation settings.

Append ?locale=ar&dir=rtl to any Vue feature page to exercise its real table in Arabic and right-to-left layout.

The code

<script setup lang="ts">
import { getDirection, getLabels } from "@adapttable/i18n";
import type { ColumnDef } from "@adapttable/vue";
import { DataTable } from "@adapttable/nuxt-ui";
import { filters } from "@adapttable/nuxt-ui/filters";

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

const rowKey = (row: Person) => row.id;
const dir = getDirection("ar");
const labels = getLabels("ar");
const features = [
  filters<Person>([{ key: "name", type: "text", label: "الاسم" }], {
    mode: "popover",
  }),
];
</script>

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

Install

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

The same feature in the other kits

More Nuxt UI features

Reference: i18n-rtl. More of this kit: AdaptTable for Nuxt UI, or the live demo.