fix: show device link dropdown inline below clicked row in Preseem devices table
The linking row was rendered in a separate loop after all device rows, causing it to always appear at the bottom of the table. Changed to use a single for loop with an inline if check so the linking row appears immediately after the corresponding device row.
This commit is contained in:
parent
19abd5508a
commit
88ee55d603
1 changed files with 3 additions and 2 deletions
|
|
@ -155,8 +155,8 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white dark:divide-white/5 dark:bg-transparent">
|
||||
<%= for ap <- @access_points do %>
|
||||
<tr
|
||||
:for={ap <- @access_points}
|
||||
id={"ap-row-#{ap.id}"}
|
||||
class="hover:bg-gray-50 dark:hover:bg-white/5"
|
||||
>
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<%!-- Inline linking row --%>
|
||||
<%= for ap <- @access_points, ap.id == @linking_ap_id do %>
|
||||
<%= if ap.id == @linking_ap_id do %>
|
||||
<tr id={"linking-row-#{ap.id}"} class="bg-indigo-50 dark:bg-indigo-900/20">
|
||||
<td colspan="6" class="px-4 py-4">
|
||||
<div class="flex items-center gap-4">
|
||||
|
|
@ -292,6 +292,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue