Fix: navigation not working after adding new commands

This commit is contained in:
Jorge Manrubia
2025-05-15 16:00:40 +02:00
parent 09f5efc100
commit 87b4643946
2 changed files with 5 additions and 2 deletions
@@ -5,6 +5,10 @@ export default class extends Controller {
static targets = [ "item" ]
static values = { selectionAttribute: { type: String, default: "aria-current" } }
connect() {
this.selectLast()
}
// Actions
navigate(event) {
+1 -2
View File
@@ -1,6 +1,5 @@
<%= turbo_frame_tag :recent_commands do %>
<ul class="terminal__menu flex-column txt-align-start margin-none margin-block-end unpad" aria-label="Recent commands" data-turbo-permanent="true"><%= render partial: "commands/command", collection: @commands %></ul>
<ul class="terminal__menu flex-column txt-align-start margin-none margin-block-end unpad" aria-label="Recent commands"><%= render partial: "commands/command", collection: @commands %></ul>
<div class="terminal--output" data-terminal-target="output"></div>
<%= render "commands/help" %>