Skip to content

Commit 193740e

Browse files
committed
TableSort: better support for thead [Closes #348]
1 parent 286651e commit 193740e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Tracy/TableSort/table-sort.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* This file is part of the Tracy (https://tracy.nette.org)
33
*/
44

5-
.tracy-sortable tr:first-child > * {
5+
.tracy-sortable > :first-child > tr:first-child > * {
66
position: relative;
77
}
88

9-
.tracy-sortable tr:first-child > *:hover:before {
9+
.tracy-sortable > :first-child > tr:first-child > *:hover:before {
1010
position: absolute;
1111
right: .3em;
1212
content: "\21C5";

src/Tracy/TableSort/table-sort.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
static init() {
1313
document.documentElement.addEventListener('click', (e) => {
14-
if (e.target.matches('.tracy-sortable tr:first-child *')) {
14+
if (e.target.matches('.tracy-sortable > :first-child > tr:first-child *')) {
1515
TableSort.sort(e.target.closest('td,th'));
1616
}
1717
});

0 commit comments

Comments
 (0)