Skip to content

Commit

Permalink
Autofocus "Organization name" in "Add Organization" form (#2855)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach authored Nov 12, 2024
1 parent 152ee04 commit 7e6ba48
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/livebook_web/live/hub/new_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,21 @@ defmodule LivebookWeb.Hub.NewLive do
<!-- FORMS -->
<div :if={@selected_option} class="flex flex-col space-y-4">
<.form
:let={f}
for={@form}
id={"#{@selected_option}-form"}
class="flex flex-col space-y-4"
for={@form}
phx-submit="save"
phx-change="validate"
>
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">
<.text_field field={@form[:name]} label="Organization name" />
<.emoji_field field={@form[:emoji]} label="Emoji" />
<.text_field field={f[:name]} label="Organization name" autofocus />
<.emoji_field field={f[:emoji]} label="Emoji" />
</div>
<.password_field
:if={@selected_option == "join-org"}
field={@form[:teams_key]}
field={f[:teams_key]}
label="Livebook Teams key"
/>
Expand Down

0 comments on commit 7e6ba48

Please sign in to comment.