TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sort tables fast with Sortable.js

32 pointsby afschwartzover 11 years ago

5 comments

periferralover 11 years ago
I needed something that provided sorting, filtering capability for a recent project. After searching high and low and trying a few options, I finally settled on datatables (<a href="http://datatables.net/" rel="nofollow">http:&#x2F;&#x2F;datatables.net&#x2F;</a>). It is incredibly feature rich and works very well for my use case.<p>Sorting is great functionality but if you really want adoption, I suggest you add the richness required by a variety of use cases. . Sorting . Filtering (regex, case etc) . Searching (column or full table) . Show&#x2F;Hide columns<p>I don&#x27;t mean to undermine to work put in here. It looks great and good luck.
评论 #6842984 未加载
评论 #6842090 未加载
评论 #6842069 未加载
zackbloomover 11 years ago
I turned it into a bookmarklet which will make every table on a page sortable, if anyone&#x27;s interested: <a href="https://gist.github.com/zackbloom/7774909" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;zackbloom&#x2F;7774909</a>
sehropeover 11 years ago
The &quot;sorting&quot; aspect of it is wrong, 2.44% is greater than 1.03% but shows up last: <a href="http://i.imgur.com/0qmIk3s.png" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;0qmIk3s.png</a><p>EDIT: I took a look at the source. There&#x27;s an extra &quot;data-&quot; field to use as the value to sort with which is hard coded to &quot;0&quot; for the 2.44% row. This also answers my question of how it was sorting the textual date fields properly (each has the year in that data- field).
评论 #6842251 未加载
评论 #6842255 未加载
orwareover 11 years ago
I&#x27;ve been using the original sorttable.js you reference on your GitHub page for my own product for a number of years.<p>How does yours differ from that one in terms of features&#x2F;capabilities?<p>Is it a rewrite with more modern techniques?
评论 #6842022 未加载
评论 #6842043 未加载
polskibusover 11 years ago
please create a &quot;filterableandsortable.js&quot; too ;)
评论 #6841944 未加载