-
Notifications
You must be signed in to change notification settings - Fork 5
First row not sorted when no header #43
Copy link
Copy link
Open
Description
Hi,
I'm using your plugin to sort entries from the todo plugin list.
Here is an example of the text I have
<sortable 1 1=alpha sumrow=0>
~~TODOLIST checkbox:no header:none~~
</sortable>
The problem I see is that when there is no header, the first line of the table is never sorted.
I looked at the code, and tried to change the following lines
var havetHead = table.tHead;
var sindex = 1;
if ( havetHead ) {
sindex = 0;
}
to
var havetHead = table.tHead;
var sindex = 0;
if ( havetHead ) {
sindex = 1;
}
So i basically switched the values 0 and 1 for the start index. It fixed the bug for me, but I'm not really sure of the global impact this might have, which is why I've not pushed an PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels