JSFiddle - React, Tailwind, and code Playground
by MrTest
JavaScript
if (RowsNumber > 10 && $(this).hasClass('not-sortable')) {
$(this).dataTable({
"bSort": false,
"sPaginationType": "full_numbers",
"bStateSave": false,
"bRetrieve": true
});
}
else if (RowsNumber <= 10 && $(this).hasClass('not-sortable')) {
$(this).dataTable({
"bSort": false,
"bStateSave": false,
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bRetrieve": true
});
}
else if (RowsNumber > 10) {
$(this).dataTable({
"sPaginationType": "full_numbers",
"bStateSave": false,
"bRetrieve": true
});
}
else {
$(this).dataTable({
"bSort": true,
"bStateSave": false,
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bRetrieve": true
});
}