Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofocus "Organization name" in "Add Organization" form #2855

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

wojtekmach
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 12, 2024

Uffizzi Preview deployment-58186 was deleted.

@@ -94,7 +94,7 @@ defmodule LivebookWeb.Hub.NewLive do
phx-change="validate"
>
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">
<.text_field field={@form[:name]} label="Organization name" />
<.text_field field={@form[:name]} label="Organization name" autofocus />
Copy link
Member

@jonatanklosko jonatanklosko Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also do <.form :let={f} ...> and use f[:name]. This way all fields will be scoped with the same id that <.form> and changing tabs will result in new elements, so that the autofocus is applied again.

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐑

@wojtekmach wojtekmach merged commit 7e6ba48 into main Nov 12, 2024
7 checks passed
@wojtekmach wojtekmach deleted the wm-new-org-autofocus branch November 12, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants