Skip to content

Commit

Permalink
Implement page selection on <select> change (#78)
Browse files Browse the repository at this point in the history
* Implement .page-select change event

* yarn build
  • Loading branch information
erdnaxe authored Apr 13, 2024
1 parent 79cb6e5 commit 35aa76e
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 50 deletions.
6 changes: 3 additions & 3 deletions assets/js/theme/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export default () => {
});

document.querySelectorAll(".page-select").forEach($el => {
if ($el.nodeValue) {
$el.addEventListener("change", e => {
const url = new URL(window.location);
url.searchParams.set("page", $el.nodeValue);
url.searchParams.set("page", e.target.value ?? "1");
window.location.href = url.toString();
}
});
});
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 35aa76e

Please sign in to comment.