Created
September 22, 2021 01:10
-
-
Save leehericks/cbba7a305dff07daa57ae487380656f9 to your computer and use it in GitHub Desktop.
Turbo-aware Stimulus controller to drive navigation via select element
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
<html> | |
<body> | |
<div data-controller="select-navigation"> | |
<select data-action="change->select-navigation#navigate"> | |
<option selected="selected" value="path/to/0">0</option> | |
<option value="path/to/1">1</option> | |
<option value="path/to/2">2</option> | |
</select> | |
<turbo-frame id="my_frame" data-select-navigation-target="frame"></turbo-frame> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment