Skip to content

Commit 5eab628

Browse files
committed
Hide dropdown until the other dropdown it depends on has a selected value
1 parent 300d784 commit 5eab628

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/live_cal_web/live/organization_user_search_live.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule LiveCalWeb.OrganizationUserSearchLive do
2727

2828
def render(assigns) do
2929
~H"""
30-
<.form for={@form} phx-submit="submit">
30+
<.form :let={f} for={@form} phx-submit="submit">
3131
<.input field={@form[:organization_id]} phx-change="select-organization"
3232
type="select"
3333
label="First select an organization to load its users:"
@@ -41,6 +41,7 @@ defmodule LiveCalWeb.OrganizationUserSearchLive do
4141
placeholder="user"
4242
options={@user_options}
4343
prompt="-- select user --"
44+
:if={f.params["organization_id"]}
4445
/>
4546
<button>Submit</button>
4647
</.form>

0 commit comments

Comments
 (0)