<script setup lang="ts">
import { ref } from "vue";
const columns = [
{ id: "id", accessorKey: "id", header: "ID"},
{ id: "name", accessorKey: "name", header: "Name" }
];
const data = ref([
{ id: 1, name: "Something" },
{ id: 2, name: "AnotherThing" }
]);
</script>
<template>
<UTable
:columns="columns"
:data="data"
:initial-state="{ columnVisibility: { id: false } }"
/>
</template>
<script setup lang="ts">
import { ref } from "vue";
const columns = [
{ id: "id", accessorKey: "id", header: "ID"},
{ id: "name", accessorKey: "name", header: "Name" }
];
const data = ref([
{ id: 1, name: "Something" },
{ id: 2, name: "AnotherThing" }
]);
</script>
<template>
<UTable
:columns="columns"
:data="data"
:initial-state="{ columnVisibility: { id: false } }"
/>
</template>