Search code examples
datatablesyadcf

yadcf plugin not filtering data


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.


Solution

  • 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