Fix: navigation not working after adding new commands
This commit is contained in:
@@ -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,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" %>
|
||||
|
||||
Reference in New Issue
Block a user