fix: Only presort tables if sort order is specified (#5408)
Thanks to @kivinen
This commit is contained in:
parent
8b815fc76d
commit
50e716e440
|
@ -277,9 +277,11 @@ $(document)
|
||||||
const presort_col = $(header_row).children("[data-default-sort]:first");
|
const presort_col = $(header_row).children("[data-default-sort]:first");
|
||||||
if (presort_col) {
|
if (presort_col) {
|
||||||
const order = presort_col.attr("data-default-sort");
|
const order = presort_col.attr("data-default-sort");
|
||||||
$.each(list_instance, (i, e) => {
|
if (order == "asc" || order == "desc") {
|
||||||
e.sort(presort_col.attr("data-sort"), { order: order, sortFunction: text_sort });
|
$.each(list_instance, (i, e) => {
|
||||||
});
|
e.sort(presort_col.attr("data-sort"), { order: order, sortFunction: text_sort });
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue