Replace uuids with "nanoid"s

This commit is contained in:
Thelonius Kort
2023-01-11 19:01:28 +01:00
parent 881a8ee094
commit 403116cd08
16 changed files with 38 additions and 33 deletions

View File

@ -49,7 +49,7 @@ defmodule Outlook.InternalTree.InternalTree do
end
defp set_attributes(node, atts, ids) do
if node.uuid in ids do
if node.nid in ids do
set_attributes(node, atts)
else
node
@ -63,7 +63,7 @@ defmodule Outlook.InternalTree.InternalTree do
Map.put(attributes, "phx-click",atts.phx.click)
# TODO: only convert to string if present
|> Map.put("phx-target", atts.phx.target |> to_string)
|> Map.put("phx-value-uuid", node.uuid)
|> Map.put("phx-value-nid", node.nid)
end
%{node | eph: Map.put(node.eph, :attributes, attributes)}
end