Not sure why 2 sort arrow groups are showing up
Not sure why 2 sort arrow groups are showing up
alexandervj
Posts: 22Questions: 10Answers: 0
Not sure why there are 2 sort arrow groups showing up in my table. Looks like maybe bootstrap is applying one set and datatable sis applying another?
Also is there a way to remove the sorting/arrows on the first few columns (icons)? Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
From the looks of it there's two seperate css files adding them on:
Line 252 of sb-admin-2.css:
the content property within that css tag is adding one set of arrows on.
Line 49 of jquery.dataTables.css:
the background-image within that css tag is adding the second set of arrows on.
Also question, how you get those textboxes at the bottom to sort each column individually?
Thanks bigzee, that fixed it! Do you know how I can remove the arrows/sorting from those icon columns?
The filtering textboxes at the bottom are from this example
https://www.datatables.net/examples/api/multi_filter.html
and then, with the help of Allan in another thread, I had to modify the code to appy only to the columns after the first 4 columns, so that those icons wouldnt have textboxes at the bottom. Here is my code
$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#example tfoot th:gt(4)').each( function () {
var title = $('#example thead th').eq( $(this).index() ).text();
$(this).html( '<input style="width:90px;" type="text" placeholder="Search '+title+'" />' );
} );
what is different than the example is the
$('#example tfoot th:gt(4)').each( function () {
and the
table.columns( ':gt(4)' ).every( function () {
Hi, do you managed to solve this issue ?