2

I am loving this yadcf plugin an all its options. But for some reason, I cannot get it to filter my data. I want to type in data and have it filter on the fly. I have looked through all the examples on the yadcf site and followed them to the best of my knowledge. I am using JQuery 2.1.4, DataTables 1.10.10, and yadcf 0.8.9.beta.26. Here is my relevant javascript:

$(document).ready(function() {
        'use strict';
        var table = $(".stocks").DataTable({
            paging: false,
            searching: false,
            info: false
        });

        yadcf.init(table, [
        {
            column_number : 4,
            filter_container_id: 'industrySearch',
            filter_default_label: "Type industry",
            filter_type: "text", 
            text_data_delimiter: ","
        }]);

Let me know if any other code is needed.

dmikester1
  • 1,374
  • 11
  • 55
  • 113

1 Answers1

2

You must remove the searching: false, from your datatables init code.

Setting searching to false disables datatables searching abilities, and since yadcf uses datatables search api under the hood that it wont work.

Read here more about this option

Daniel
  • 36,833
  • 10
  • 119
  • 200
  • Works perfect! Thank you. So if I don't actually want that search field, I just have to hide it manually with css or javascript? – dmikester1 Dec 06 '15 at 04:21
  • You can take a look at my other answer related to it http://stackoverflow.com/a/9962171/617373 :) – Daniel Dec 07 '15 at 18:15