Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8116e78f5 | ||
|
|
fa8789a589 | ||
|
|
b38c878724 | ||
|
|
969e246b81 |
@@ -339,9 +339,24 @@ body {
|
|||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-filter-wrap {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-filter-wrap > * {
|
||||||
|
grid-area: 1 / 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-filter-ghost {
|
||||||
|
visibility: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
font: inherit;
|
||||||
|
pointer-events: none;
|
||||||
|
padding: 2px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.col-filter-text {
|
.col-filter-text {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 40px;
|
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
|
|||||||
@@ -72,6 +72,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
th.appendChild(select);
|
th.appendChild(select);
|
||||||
}
|
}
|
||||||
} else if (colName) {
|
} else if (colName) {
|
||||||
|
const wrap = document.createElement("div");
|
||||||
|
wrap.className = "col-filter-wrap";
|
||||||
|
|
||||||
|
const ghost = document.createElement("span");
|
||||||
|
ghost.className = "col-filter-ghost";
|
||||||
|
ghost.setAttribute("aria-hidden", "true");
|
||||||
|
ghost.textContent = colName;
|
||||||
|
|
||||||
const input = document.createElement("input");
|
const input = document.createElement("input");
|
||||||
input.type = "text";
|
input.type = "text";
|
||||||
input.className = "col-filter col-filter-text";
|
input.className = "col-filter col-filter-text";
|
||||||
@@ -85,8 +93,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
applyFilters();
|
applyFilters();
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
wrap.appendChild(ghost);
|
||||||
|
wrap.appendChild(input);
|
||||||
th.textContent = "";
|
th.textContent = "";
|
||||||
th.appendChild(input);
|
th.appendChild(wrap);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user