Discourse Proposal: Smarter Tables

I have created a Discourse component to wrap native Discourse tables with some smarts via the datatables.net library. By wrapping your table with , you will automatically get a search box and sort icons.


You can pass native lib arguments by putting dt in front of their name like I’ve demonstrated with paging (Discourse strips namespacing via “-” or other special char). I’ve also written a quick column filter as well you can enable via filters=true.

Thoughts on whether we should enable it? I’m hoping to really clean up with Suppliers Directory - Where to get parts and materials.

6 Likes

I like it. I think I prefer the second table, where you can filter for the results of the columns per se. But would this modify ALL the tables?

While we’re talking, I think there should be one main page, accessible from the top bar that is a visual guide to all the sections we have. I saw you were creating an index of the howto page… I guess that’s kind of a start, although I think it should maybe be visual? Something where everything fits above the fold? I’ll come up w/ something if no one else has any cool ideas.

So the tables are opt in and configurable based on the wrap syntax. Check out the examples.

Can we make the defaults larger? So it’s not 10 per page?

Other than that, I think it’ll help! For sure

This is a great idea - makes larger datasets much easier to use.

1 Like

I read the title and thought you meant tables :smiley:

2 Likes

behold, the only true smart table