Javascript plugin that mimics Google Sheets sort and filter functionality?

959 Views Asked by At

Wondering if anyone knows of a Javascript plugin with the functionality to sort and filter an HTML table similar to Google Sheets and Excel (see pic). Specifically, the filtering functionality is the kind where multiple values can be checked/unchecked (as opposed to a search box which can only search one value).

I know the functionality exists but I've looked high and low and haven't found anything. Here are some that don't have the checkbox filtering option:

The list could go on, but I haven't found anything out of the box.

(Names in image are fake).

enter image description here

2

There are 2 best solutions below

0
On

You might be able to write your own, as seen in this answer.

The basic idea is that you present a checkbox for each unique value, and only show if the corresponding checkbox is true. JS's grep feature should help tremendously.

0
On

This should help you with your project: https://code.google.com/p/jquery-datatables-column-filter/ it is a plugin for datatables.net which you already have come across.

There is example code to enable a multi-checkbox type filter on your tables here: http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html

With some CSS magic you should be able to make it look exactly like Google Sheets if you wish.