Dunowen
Dunowen
NNuxt
Created by Patrity on 10/12/2024 in #❓・help
Nuxt UI Table Expand - Programmatic/API Access
You could do something like this:
<UTable :rows="people" ref="my-table">
<template #expand="{ row }">
<div class="p-4">
<pre>{{ row }}</pre>
</div>
</template>
</UTable>
<UTable :rows="people" ref="my-table">
<template #expand="{ row }">
<div class="p-4">
<pre>{{ row }}</pre>
</div>
</template>
</UTable>
Script:
const input = useTemplateRef("my-table");
input.value?.toggleOpened(2);
const input = useTemplateRef("my-table");
input.value?.toggleOpened(2);
I'm not sure if this is the intended way to use the toggleOpened(index) function though, I've just looked into the source code of the Table component and that's what I found.
6 replies