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?
[ Parent
| on HN ]
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.