Open dandv opened 10 years ago
This gives me a good idea for a new demo - a reactive table listing table libraries and their features :)
I'll work on that later, but to answer your question, reactive-table currently supports pagination, sorting by clicking on column headers (for columns coming straight from collection attributes), and filtering. I'm definitely planning to add in-place editing and may get to the other things at some point - let me know what's most important to you.
reactive-table can't compete with the others in terms of features yet, but its main advantage is that it is very easy to use in meteor. My team tried out many of the other libraries and had problems setting them up or getting them to work well with meteor's collections and reactivity.
Regarding the existing demo, I deliberately left it insecure in case someone wanted to try adding things to the table, and it looks like someone wrote a script to repeatedly delete all the players and re-add some one at a time. I thought about disabling it, but actually it's a pretty good way to demonstrate the table's reactivity. Leave it open and some players may start showing up, or add one from the console like so: Players.insert({'name': 'player', 'score': 5})
That demo would be great!
Most important to me at this point would be column resizing. Happy to test.
My team tried out many of the other libraries and had problems setting them up or getting them to work well with meteor's collections and reactivity.
I see some packages on atmosphere for datatables.net (abandoned, though, the author apparently moved on to more exciting things) and slickgrid. None of those worked?
Re. the current demo, I'm thinking it might turn off users who see an empty table. Maybe defined a few of the records as protected from client-side write operations?
Here it is: http://reactive-table.meteor.com/ Let me know what you think!
The datatables and slickgrid packages for meteor are just wrappers for the original libraries - as far as I know, there's nothing out there to make them work with meteor's collections and reactivity. We did try both datatables and slickgrid and got them working as static tables, but couldn't get them to update when the data changed.
With datatables, we could render the table html using meteor, but when we initialized datatables, it would change the structure so that meteor could no longer update it. And slickgrid requires passing in all the data. In theory it should be possible to use meteor's Deps + the datatables or slickgrid API to compute the updates to the data and modify the table one row at a time, but after struggling with it for a while it seemed easier to just build a table specifically for meteor.
Very cool!
The only correction I'd make is that tablesorter does support pagination and DataTables is resizable and displays well on very narrow widths.
Any chance to add links to examples (like the ones above) under/next to the checkmarks?
Updated and added those examples. If you'd like to track down more examples, the code is here - just replace the true
s with links.
Great, added more info to the feature comparison matrix and linked to the demo as a table/grid component feature comparison on SO :)
Wonder how Datatables and others work with Blaze. Avital told me they should work much better. Still, a native Meteor table/grid package is great to have, especially as it evolves to meet the most commonly requested features of the established packages.
I'm curious too. If you try any of them, let me know how it goes. It looks like blaze will require pretty major changes to this package, so if the others work well it might be better to just create a more useful meteor wrapper for one of them.
DataTables.net is now packaged for Meteor. Haven't tried it, but the description sounds quite exciting.
Here's the updated url for meteor-jquery-datatables
As the lumapictures:meteor-jquery-datatables states, aldeed:tabular should be a primary consideration for DataTables support. Please add aldeed:tabular to the comparison.
@brylie: aldeed:tabular
wraps Datatables.net, which is listed in the comparison: http://reactive-table.meteor.com/
BTW, you can contribute to the comparison table by editing table-features.js.
@dandv such great work. Any thoughts on mobile/responsive support for reactive tables? :)
@gustawdaniel, yes MDG removed the free hosting under .meteor.com a few years ago.
@aslagle, is the demo/comparison available anywhere else?
No, I'm afraid not. I'm sure the info in it is also very outdated by now.
There's a lot of prior art when it comes to table/grid components. Would be interesting to know how this library compares to DataTables (check out @aldeed's tabular package), Dynatable, Tablesorter, SlickGrid etc.
UPDATE: Here's a comparison: http://reactive-table.meteor.com/