doSearch: function (component, event, helper) { let tableElem = component.find("myTable").getElement(); let table = $(tableElem).DataTable({ "retrieve": true }); let searchResult = table.search(‘‘); let f1 = component.get("v.filter1"); if (f1.length > 0) { f1 = f1.replace(‘\(‘, ‘\\(‘).replace(‘\)‘, ‘\\)‘); searchResult = searchResult.column(8).search(‘^‘ + f1 + ‘$‘, true, false); } else { searchResult = searchResult.column(8).search(‘‘); } let f2 = component.get("v.filter2"); if (f2.length > 0) { f2 = f2.replace(‘\(‘, ‘\\(‘).replace(‘\)‘, ‘\\)‘); searchResult = searchResult.column(12).search(‘^‘ + f2 + ‘$‘, true, false); } else { searchResult = searchResult.column(12).search(‘‘); } let f3 = component.get("v.filter3"); if (f3.length > 0) { searchResult = searchResult.column(2).search(‘^‘ + f3 + ‘$‘, true, false); } else { searchResult = searchResult.column(2).search(‘‘); } let f4 = component.get("v.filter4"); if (f4.length > 0) { searchResult = searchResult.column(0).search(f4); } else { searchResult = searchResult.column(0).search(‘‘); } searchResult.draw(); }