Add wrapper for garnish/2 for phx event
This commit is contained in:
@ -141,8 +141,10 @@ defmodule OutlookWeb.TranslationLive.FormComponent do
|
||||
socket
|
||||
|> assign(
|
||||
:article_tree,
|
||||
InternalTree.garnish(translation.article.content,
|
||||
%{tunits: %{phx: %{click: "select_current_tunit", target: socket.assigns.myself}}}))
|
||||
InternalTree.add_phx_click_event(translation.article.content,
|
||||
nodes: :tunits,
|
||||
click: "select_current_tunit",
|
||||
target: socket.assigns.myself))
|
||||
end
|
||||
|
||||
defp update_translation_with_current_tunit(socket, nil), do: socket
|
||||
|
||||
Reference in New Issue
Block a user