fix: missing actor on tturning back from edit
This commit is contained in:
parent
2b1f49d60a
commit
ce542eae3e
1 changed files with 4 additions and 1 deletions
|
|
@ -219,6 +219,9 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do
|
||||||
send(self(), {:editing_section_changed, nil})
|
send(self(), {:editing_section_changed, nil})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Get actor from assigns or fall back to socket assigns
|
||||||
|
actor = Map.get(assigns, :actor, socket.assigns[:actor])
|
||||||
|
|
||||||
{:ok,
|
{:ok,
|
||||||
socket
|
socket
|
||||||
|> assign(assigns)
|
|> assign(assigns)
|
||||||
|
|
@ -228,7 +231,7 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do
|
||||||
|> assign_new(:show_delete_modal, fn -> false end)
|
|> assign_new(:show_delete_modal, fn -> false end)
|
||||||
|> assign_new(:custom_field_to_delete, fn -> nil end)
|
|> assign_new(:custom_field_to_delete, fn -> nil end)
|
||||||
|> assign_new(:slug_confirmation, fn -> "" end)
|
|> assign_new(:slug_confirmation, fn -> "" end)
|
||||||
|> stream(:custom_fields, stream_custom_fields(assigns[:actor], self()), reset: true)}
|
|> stream(:custom_fields, stream_custom_fields(actor, self()), reset: true)}
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue