Replies: 1 comment
-
I actually fixed the example by doing the following: What is in the documentation: // data-table.svelte
<script>
// ...
const columns = table.createColumns([
// ...
table.column({
accessor: ({ email }) => email,
header: "",
cell: (item) => {
return createRender(DataTableActions, { id: item.id });
}
})
]);
</script> My code // data-table.svelte
<script>
// ...
const columns = table.createColumns([
// ...
table.column({
accessor: ({ id }) => id,
header: "",
cell: ({value}) => {
return createRender(DataTableActions, { id: value });
}
})
]);
</script> As per the Let me know if it is worth a documentation correction. I'd be glade to help with a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm doing a tour of
shadcn-svelte
as well as experimenting the few additional deps that are recommended in the documentation likesvelte-headless-table
orformsnaps
. And I am currently at the stepRow actions
in the data-table documentation, and my copy id seems to not work as theitem.id
is empty.And I cannot figure out if it is an error on my ends, or if it is expected, as this is just a dummy to show what you can do.
My experiementation can be found in this repo: https://github.com/Skylli202/sveltekit-experimentation
Beta Was this translation helpful? Give feedback.
All reactions