fix: use correct Datastar keydown event syntax
Replace invalid .key_enter and .enter modifiers with evt.key === 'Enter' guard in the expression, per Datastar docs. Also fix __stop and __throttle modifier syntax to use double underscores.
This commit is contained in:
@@ -73,7 +73,7 @@ templ LobbyPage(data LobbyData) {
|
||||
placeholder="Enter your nickname"
|
||||
data-bind="nickname"
|
||||
required
|
||||
data-on:keydown.enter={ datastar.PostSSE("/games") }
|
||||
data-on:keydown={ "evt.key === 'Enter' && " + datastar.PostSSE("/games") }
|
||||
/>
|
||||
</fieldset>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user