Home » Jquery » jQuery Datatable search is not working while using autocomplete field populated data and dependent data-Exceptionshub

jQuery Datatable search is not working while using autocomplete field populated data and dependent data-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

My page contains the first input text box is autocomplete field. Based on the selected value we are populating the remaining data normal text and input, select drop down values.

When I try to search the values using datatables search its not working for me.

Sample Screenshot for Datatable with search

my sample code used for adding dynamic row.

table.row.add(['<input type="text" id="field1" class="field1" name="field1" />',
    '<label id="field2" name="field2"></label>',
    '<input type="text" id="field3" name="field3" />',
    '<label id="field4" name="field4"></label>',
    '<input type="text" id="field5" name="field5" />',
    '<label id="field6" name="field6"></label>',
    '<input type="text"  id="field7" name="field7" />',
    '<select  id="field8" name="field8"></select>',
    '<select  id="field9" name="field9"></select>'
]).draw();

I try with below code changes but its not working for me.

When i try with table.cell($td).invalidate().draw(). My autocomplete functionality is breaking.

How to&Answer: