mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
fix: use SolidJS Show component for proper conditional rendering
addresses #370 - switched from JSX conditional expressions to SolidJS Show component for table column conditional rendering to ensure proper DOM updates
This commit is contained in:
@@ -694,14 +694,14 @@ export function Dashboard(props: DashboardProps) {
|
||||
>
|
||||
VMID {sortKey() === 'vmid' && (sortDirection() === 'asc' ? '▲' : '▼')}
|
||||
</th>
|
||||
{groupingMode() === 'flat' && (
|
||||
<Show when={groupingMode() === 'flat'}>
|
||||
<th
|
||||
class="px-2 py-1.5 text-left text-[11px] sm:text-xs font-medium uppercase tracking-wider w-[100px] cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600"
|
||||
onClick={() => handleSort('node')}
|
||||
>
|
||||
Node {sortKey() === 'node' && (sortDirection() === 'asc' ? '▲' : '▼')}
|
||||
</th>
|
||||
)}
|
||||
</Show>
|
||||
<th
|
||||
class="px-2 py-1.5 text-left text-[11px] sm:text-xs font-medium uppercase tracking-wider w-[100px] cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600"
|
||||
onClick={() => handleSort('uptime')}
|
||||
|
||||
@@ -156,11 +156,11 @@ export function GuestRow(props: GuestRowProps) {
|
||||
</td>
|
||||
|
||||
{/* Node (optional) */}
|
||||
{props.showNode && (
|
||||
<Show when={props.showNode}>
|
||||
<td class="p-1 px-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{props.guest.node}
|
||||
</td>
|
||||
)}
|
||||
</Show>
|
||||
|
||||
{/* Uptime */}
|
||||
<td class={`p-1 px-2 text-sm whitespace-nowrap ${
|
||||
|
||||
Reference in New Issue
Block a user