News for hackers. Stuff that matters.
[dead]
Re:React Table is a “headless” UI library by tannerlinsley on Monday November 25, 2019 @01:38PM (#21631277)
"Plain old HTML" is great. And guess what, because React Table is headless, you can render your tables using standard HTML table elements (table,thead,tbody,tr,th,td,tfoot,etc...).

Html elements on their own, however, are not capable of sorting, filtering, grouping, selection, nested header generation, (insert any feature from React Table here), let alone making all of those things perform well together.

Re:React Table is a “headless” UI library by mcaruso on Monday November 25, 2019 @01:39PM (#21631284)
It's a React component for data tables. So it implements (re)loading data, sorting, pivoting, and the other stuff mentioned in this feature list:

https://github.com/tannerlinsley/react-table#features

So the comparison to HTML tables is a bit odd, because (as per the article linked by OP) it does pretty much everything except the UI part.

(I'm not the author, I just use this library at my work.)

Re:React Table is a “headless” UI library by deergomoo on Monday November 25, 2019 @01:37PM (#21631264)
https://github.com/tannerlinsley/react-table/blob/master/doc...

Filtering, sorting, collapsing, etc. Can’t do any of that with plain HTML. And if the rest of your app is React, trying to integrate something non-React is just a headache.

Re:React Table is a “headless” UI library by aasasd on Monday November 25, 2019 @04:28PM (#21632994)
> Can’t do any of that with plain HTML

Well, you can if you reload the page from the backend for each of those operations. Like we did in the 00s.

Re:React Table is a “headless” UI library by wnevets on Monday November 25, 2019 @01:35PM (#21631241)
how do you do in browser sorting with a plain old html table?
Re:React Table is a “headless” UI library by at-fates-hands on Monday November 25, 2019 @03:01PM (#21632156)
<table class="sortable">

Adding the “sortable” class to a <table> element provides support for sorting by column value. Clicking the column headers will sort the table rows by that column’s value. Tables must use <thead> and <th> tags for sortable functionality to work.

Re:React Table is a “headless” UI library by akdor1154 on Monday November 25, 2019 @03:44PM (#21632592)
The hell? Did you copy and paste this from WordPress docs? That has nothing to do with native html functionality.
Re:React Table is a “headless” UI library by nkrisc on Monday November 25, 2019 @03:56PM (#21632735)
Now that your <table> element has the class "sortable," what are you going to do to actually make it sortable?
Re:React Table is a “headless” UI library by ajanuary on Monday November 25, 2019 @05:42PM (#21633606)
This is a copy and paste of the snippet google shows from https://www.bu.edu/tech/services/cccs/websites/www/wordpress... if you search for “sortable table”. The page is actually talking about how to author pages on their Wordpress site, which presumably uses a wordpress plugin to provide the JavaScript necessary to make this work.
Re:React Table is a “headless” UI library by lowboy on Monday November 25, 2019 @03:50PM (#21632675)
this is not native browser behaviour and will only work if you include a JS lib that provides this functionality based on a classname of "sortable"
Re:React Table is a “headless” UI library by wnevets on Monday November 25, 2019 @03:06PM (#21632199)
I'm assuming that is with this react project. The OP was asking why this project is needed at all.