From cca53ed1544c99ba799c41dc858a275d079bb428 Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Fri, 13 Dec 2024 09:32:06 -0800 Subject: [PATCH] Adds relative div to ensure that sorting arrow doesn't run away --- .../components/custom_components/table_components.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pinchflat_web/components/custom_components/table_components.ex b/lib/pinchflat_web/components/custom_components/table_components.ex index 9a85d8f..6ad1502 100644 --- a/lib/pinchflat_web/components/custom_components/table_components.ex +++ b/lib/pinchflat_web/components/custom_components/table_components.ex @@ -40,12 +40,14 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do phx-click={col[:sort_key] && "sort_update"} phx-value-sort_key={col[:sort_key]} > +
{col[:label]} <.icon :if={to_string(@sort_key) == col[:sort_key]} name={if @sort_direction == :asc, do: "hero-chevron-up", else: "hero-chevron-down"} class="w-3 h-3 mt-2 ml-1 absolute" /> +