Adds relative div to ensure that sorting arrow doesn't run away

This commit is contained in:
Kieran Eglin 2024-12-13 09:32:06 -08:00
parent 82729085d2
commit cca53ed154
No known key found for this signature in database
GPG key ID: 193984967FCF432D

View file

@ -40,12 +40,14 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do
phx-click={col[:sort_key] && "sort_update"}
phx-value-sort_key={col[:sort_key]}
>
<div class="relative">
{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"
/>
</div>
</th>
</tr>
</thead>