Datatable dropdown filter is not sorting exact word

Datatable dropdown filter is not sorting exact word

subbarajusubbaraju Posts: 5Questions: 3Answers: 0

in dropdownlist i have

IT
IT-TEK
SECURITY
3D

WHEN i select IT in drop-down list it display IT,IT-TEK,SECURITY

I what only Exact Word filter in drop-down can you help me for this

Answers

  • subbarajusubbaraju Posts: 5Questions: 3Answers: 0
    edited August 2016
            $.each($('.select-filter', table.table().header()), function () {
                var that = table.column($(this).index());
    
                // Create the select list and search operation
                var select = $('select', this)
                   .on('change', function () {
                       that
                           .search(this.value)
                           .draw();
                   });
                // Get the search data for the first column and add to the select list
                that
                    .cache('search')
                    .sort()
                    .unique()
                    .each(function (d) {
                        select.append($('<option value="' + d + '">' + d + '</option>'));
                    });
            });
    

    THIS is my search code

This discussion has been closed.