-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: TanStack Table #1189
Comments
The last time I tried tanstack table it was a nightmare. I'll revisit the Svelte 5 rewrite and see how it goes. |
@huntabyte I have been using tanstack table with Svelte for a while without any problems. Which problems did you encounter? |
Happy for it to be something that's not TanStack table. Just something that's maintained with similar functionality to ease my mind haha |
Personally I would prefer Tanstack Table, have been using it for over a year and nothing else really comes close to it. |
I'm indifferent to what ends up being used, but here is something else for consideration. (The runes-powered v2 is currently in preview)
Here's even a shadcn-svelte example: |
Just tried @tanstack/svelte-table@alpha on one of my current tables since I want to start using Svelte 5. Seems to be working fine. You do have to have If @huntabyte and the rest are cool with it I can write some documentation on how to use it. Perhaps a new section on the bottom of the current data-table docs with instructions on how to make data-tables with Svelte 5. |
This is just a heads up for anyone following the current docs on Data Table. I had an issue where I wanted to combine pagination and sort with the current Data Table per docs but use a different icon for sorting the table up and down. The solution is to include 2 unused properties, const { hasNextPage, hasPreviousPage, pageIndex, pageCount, pageSize } = pluginStates.page; Even though this is not mentioned in the docs because there an If we stick with svelte-headless-table for a while this is possibly worth mentioning in the docs. |
+1 for TanStack |
After having used TanStack pretty extensively over the last few days, I can confirm that most of the issues I experienced with it the first time have been corrected. If someone would like to update the DataTable docs and examples to use TanStack it would be greatly appreciated, otherwise, I will get to it as soon as I have the chance! |
I'll be happy to have a go. I just recently tried to do this myself and I've got a draft PR open on a personal project. My main blocker has been trying to pass children to table cells as part of the table definition, something that was possible with Update 2/09/2024: this issue looks like it might resolve the issue I had, will have a prod around |
Okay so rather than doubling up on trying to convert the Tasks demo (@shyakadavis has picked it up in #1260), I implemented the Data Table for my own project here at c-kirkeby/osrs-price-site#3. It doesn't have the filter or the actions / row selection or the filters from the Tasks example, and mine has some more complex use cases like colouring cells / right-aligning cells. One issue I ran into was this: Due to TanStack/table#4382 there are some TypeScript errors when assigning I don't love the Svelte API for TanStack. It's a lot of React-like getters and setters, where as |
It might be worth to point out that TanStack Table will not be supported by Svelte 5 out of the box. sveltejs/svelte#10359 (comment) Perhaps it is a good idea to wait for TanStack Table to support Svelte 5 before writing new documentation. |
@robots4life Correction: Tanstack Table v8 will not support Svelte 5, Tanstack Table v9 only supports Svelte 5 and up |
I have used Tanstack Table v9 alpha for the last two months and from what I've experienced it isn't ready for use yet. I'd suggest waiting for the release or maybe make separate examples for both Tanstack Table and datatables |
Here is a guide to using Svelte 5 with TanStack Table v8 that @walker-tx put together. https://github.com/walker-tx/svelte5-tanstack-table-examples
|
We're now using TanStack Table in |
Correct me if I'm wrong here, but is the table reactive if it needs to be reassigned ? Is the Tanstack Svelte lib not using signals ? |
@dlamon1 Tanstack table v9 alpha is |
Describe the feature
See here
bryanmylee/svelte-headless-table#224
Plus shadcn/ui says it's based on Tanstack Table.
Thanks for all your hard work!
Jason
The text was updated successfully, but these errors were encountered: