Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82204

Yet Another DataTables Column Filter - (yadcf)

$
0
0
Hi,

Just wanted to say that I've finally finished my column filter plugin for datatables.

It's called "Yet Another DataTables Column Filter" or in short "yadcf"


I started to develop it for my own use and at some point decided to release its as plugin...


Here a kickoff example: http://jsbin.com/esezof/1

Here the github page: https://github.com/vedmack/yadcf


And here some info about the features:


*Parsing various types of columns:

plain text
plain text with delimiter
one or more HTML elements with the ability to extract text / value / id from each HTML element

*CSS support:

each filter element has got a css style class , so its style can be easily overridden
Reset button for filter:
next to each filter a reset button will appear (this button allows the user to reset the filter)

*Filter in use visual notification:

when a certain filter is being used it will be highlighted (the color of highlight can easily be changed with css)

*Miscellaneous:

predefined data source for filter (array of strings)
ability to place the filter in an external html element (for example: inside a div element)
change the filter's default label (Select value, etc)
change the filter's reset button text (x, clear etc)



Usage example:

$(document).ready(function(){
  $('#example').dataTable().yadcf([
    {column_number : 0},
    {column_number : 1, filter_container_id: "external_filter_container"},
    {column_number : 2, data:["Yes","No"], filter_default_label: "Select Yes/No"},
    {column_number : 3, text_data_delimiter: ",", filter_default_label: "Select value"},
    {column_number : 4, column_data_type: "html", html_data_type: "text", filter_default_label: "Select tag"}]);
});


Regards,

Daniel

Viewing all articles
Browse latest Browse all 82204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>