Anyone here using angular-datatables in AngularJS?
Edited: I want to filter data in my table. In specific. like if the select is about category. It will only filter what's in the category column. But in my filter as of now. It filters everything.
Here is my code for filtering select. I just copy how the "search box" filtered the data. because I don't know the correct code for filtering using select. and It is customized.
function dtInstanceCallback (dtInstance) {
var datatableObj = dtInstance.DataTable;
vm.tableInstance = datatableObj;
}
function searchTable () {
var query = vm.queryProductSearch;
vm.tableInstance.search(query).draw();
}
function selectCategoryInTable () {
var sel = vm.selCategory;
vm.tableInstance.search(sel).draw();
}
function selectStatusInTable () {
var sel = vm.selStatus;
vm.tableInstance.search(sel).draw();
}
the searchTable() is for my search box. and selectCategoryInTable / selectStatusInTable is for my category column and status column in my table. But it filters everything.
And I want to know how to filter specific data. Like if I filter "ACTIVE". my data in datatable will show "INACTIVE" too because there's "ACTIVE" in "INACTIVE". so I want to filter specific word.