Forum Discussion
Parshant
Boss
SheryBulos, Try this code:
<@liaAddScript>
;(function($){
$(document).ready(function() {
$('table.generic').DataTable();
} );
var setTablesFilters = (attrName, tableId, attrIndex) => {
var table = $('#'+tableId).DataTable();
let uniqueFilterList = table.column(attrIndex).data().unique().toArray();
return uniqueFilterList.map((val)=>{ return {'name':val, 'checked': false}});
}
})(LITHIUM.jQuery);
</@liaAddScript>
SheryBulos
5 years agoAce
Hello Parshant
Just to make sure that we are on the same page
I tried this but I got the same error also
"Uncaught ReferenceError: setTablesFilter is not defined at HTMLButtonElement.onclick."
<@liaAddScript>
;(function($){
// all js and jquery code here
})(LITHIUM.jQuery);
</@liaAddScript>
Thanks in advance,
Shery
- Parshant5 years agoBoss
SheryBulos , looks like library which contains setTablesFilter function is not added here in the community
Related Content
- 2 years ago
- 12 years ago