From 306a16ba9cfbc82b29767d10a9d6bfeba92314e9 Mon Sep 17 00:00:00 2001 From: Jon Principe Date: Wed, 9 Mar 2022 21:38:06 -0500 Subject: [PATCH] pass through assign attrs in link#navigate helper --- lib/live_beats_web/live/live_helpers.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/live_beats_web/live/live_helpers.ex b/lib/live_beats_web/live/live_helpers.ex index 2dc8eb5..8febf45 100644 --- a/lib/live_beats_web/live/live_helpers.ex +++ b/lib/live_beats_web/live/live_helpers.ex @@ -124,9 +124,11 @@ defmodule LiveBeatsWeb.LiveHelpers do def link(%{navigate: _to} = assigns) do assigns = assign_new(assigns, :class, fn -> nil end) + opts = assigns_to_attributes(assigns, [:navigate]) + assigns = assign(assigns, :opts, opts) ~H""" - + <%= render_slot(@inner_block) %> """