This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
Creating Datatables within #each, dynamic table count #50
amsmith-pro
started this conversation in
Ideas
Replies: 1 comment
-
Hello, I think the best solution is to create your own component that embeds 1 datatable Something like {#each Object.entries(dictionaries) as [name, dic_data]}
<MyComponent id={name} data={dic_data}/>
{/each} Each of Just "let rows", no need to worry about indexes anymore |
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
-
Hello -
Disclaimer: I'm new to Svelte, the answer to this may be obvious
In the multiple tables example, you declare
rows1
androws2
in advance for two tables. How would I dynamically create n tables at runtime?Something like:
Tried something like
bind:dataRows={rows[counter]}
withlet rows = Array<any>(Object.keys(dictionaries).length)
but couldn't get the data to display with:Beta Was this translation helpful? Give feedback.
All reactions