fix(website): open entry anchors after restoring filters

This commit is contained in:
Shubham Padkonde 2026-10-27 17:36:05 +05:30
parent 21d57daf1c
commit ee9dfa0d8e
2 changed files with 68 additions and 5 deletions

View file

@ -361,11 +361,6 @@ document.addEventListener("click", function (e) {
gtag("event", "sponsor_contact", { tier: link.dataset.tier });
});
if (location.hash) {
const linkedRow = document.getElementById(decodeURIComponent(location.hash.slice(1)));
if (linkedRow && linkedRow.matches("tr.row")) openEntryRow(linkedRow);
}
if (searchInput) {
let searchTimer;
searchInput.addEventListener("input", function () {
@ -451,4 +446,9 @@ if (backToTop) {
sortRows();
}
updateSortIndicators();
// Filtering collapses rows, so open a linked entry after restoring URL state.
if (location.hash) {
const linkedRow = document.getElementById(decodeURIComponent(location.hash.slice(1)));
if (linkedRow && linkedRow.matches("tr.row")) openEntryRow(linkedRow);
}
})();