Get id's of all selected items #188
Replies: 2 comments 2 replies
-
Seems like that tutorial uses the <script>
const table = createTable(data, {
select: addSelectedRows({...}),
});
const columns = table.createColumns(...);
const {headerRows, rows, pluginStates} = table.createViewModel(columns);
const {selectedDataIds} = pluginStates.select;
$: console.log($selectedDataIds);
</script> |
Beta Was this translation helpful? Give feedback.
1 reply
-
Sorry, I actually searched issues instead of discussions before posting this question. I fixed it using the answer in: #110 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have followed the steps described here to create a data-table: https://www.shadcn-svelte.com/docs/components/data-table#row-selection
In my data-table the
A question I have is how do I get the id's from all selected items in the table? With id I mean the values from my 'DB'.
In the example this is the Payments array: https://www.shadcn-svelte.com/docs/components/data-table#initialize-table
Beta Was this translation helpful? Give feedback.
All reactions