Created
November 15, 2023 10:13
-
-
Save tommyp/0697aa8a7777e6ceb875cc75b4f577e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let Hooks = {} | |
Hooks.ScrollableList = { | |
updated() { | |
this.el.querySelectorAll("li").forEach((option) => { | |
option.addEventListener("focus", e => { | |
e.target.scrollIntoView(); | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment